#include using namespace std; const vector thres={15, 23, 43, 102}; const vector val={7, 6, 4, 2}; int eval(int e, int a) { int d=abs(e-a); for (int i=0; i<4; i++) if(d<=thres[i]) return val[i]; return 0; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,m; cin>>n>>m; vector> dp(n+1,vector(m+1)); vector e(n), a(m); for (int i=0; i>e[i]; for (int i=0; i>a[i]; for (int i=0; i<=n; i++) for (int j=0; j<=m; j++) { if(i