#include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair P; const int MN = 11; const int r = 11; const int c = 11; int main() { int rr, cc; cin >> rr >> cc; static double p[MN][MN]; static int s[MN][MN]; for (int i = 0; i < rr; i++) { for (int j = 0; j < cc; j++) { cin >> p[i][j]; p[i][j] /= 100.0; } } for (int i = 0; i < rr; i++) { for (int j = 0; j < cc; j++) { cin >> s[i][j]; s[i][j] = 4-s[i][j]; } } double dp1[1<= 4) { ll |= (1<= 0; m--) { int u = 0; if (l & (1<= 4 || (ll & (1<