/* 入力 validation。WA なら OK。 */ #include"testlib.h" #include using namespace std; using ll = long long; const int MIN_N = 2; const int MAX_N = 18; const int MIN_M = 2; const int MAX_M = 10000; const int MIN_Q = 2; const int MAX_Q = 50000; int main(){ registerValidation(); int N = inf.readInt(MIN_N, MAX_N, "N"); inf.readSpace(); int M = inf.readInt(MIN_M, MAX_M, "M"); inf.readSpace(); int Q = inf.readInt(MIN_Q, MAX_Q, "Q"); inf.readEoln(); int cnt = 0; bool testcase = false; for (int i = 0; i < Q; i++){ int t = inf.readInt(1, 3, "t"); inf.readSpace(); if (t == 1){ int B = inf.readInt(1, cnt+1, "B"); assert(B <= M); if (B == cnt+1) cnt++; inf.readSpace(); vector v(N,0); for (int j = 0; j < N; j++){ int p = inf.readInt(1,N,"p"); v[p-1]++; if (j == N-1) inf.readEoln(); else inf.readSpace(); } bool s = true; for (int j = 0; j < N; j++) if (v[j] == 0) s = false; assert(s); } else if (t == 2){ int S = inf.readInt(1, cnt, "S"); inf.readEoln(); testcase = true; } else if (t == 3){ int L = inf.readInt(1, cnt, "L"); inf.readSpace(); int R = inf.readInt(1, cnt, "R"); assert(L <= R && R <= M); inf.readEoln(); testcase = true; } } assert(testcase); inf.readEof(); return 0; }