// validator by opt #include "testlib.h" #include using namespace std; #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) const int MIN_N = 1; const int MAX_N = 200; const int MIN_K = 1; const int MAX_K = 200; const int MIN_A = 0; const int MAX_A = 200; const int MIN_B = 0; const int MAX_B = 200; const int MIN_P = 0; const int MAX_P = 200; signed main(int argc, char* argv[]) { registerValidation(argc, argv); int N = inf.readInt(MIN_N, MAX_N, "N"); inf.readSpace(); int K = inf.readInt(MIN_K, MAX_K, "K"); inf.readEoln(); vector A(N), B(N); rep(i, N) { A[i] = inf.readInt(MIN_A, MAX_A, "A_i"); if (i < N-1) inf.readSpace(); else inf.readEoln(); } rep(i, N) { B[i] = inf.readInt(MIN_B, MAX_B, "B_i"); if (i < N-1) inf.readSpace(); else inf.readEoln(); } int sum_A = 0, sum_B = 0; rep(i, N) sum_A += A[i]; rep(i, N) sum_B += B[i]; assert(sum_A == K); assert(sum_B == K); rep(i, N) rep(j, N) { inf.readInt(MIN_P, MAX_P, "P_ij"); if (j < N-1) inf.readSpace(); else inf.readEoln(); } inf.readEof(); }