結果

問題 No.1558 Derby Live
ユーザー noya2noya2
提出日時 2021-05-15 14:28:35
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,490 bytes
コンパイル時間 7,087 ms
コンパイル使用メモリ 305,588 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-07 13:55:39
合計ジャッジ時間 10,559 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

/*
入力 validation。WA なら OK。
*/

#include"testlib.h"
#include<bits/stdc++.h>
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<int> 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;
}
0