結果

問題 No.2283 Prohibit Three Consecutive
コンテスト
ユーザー 👑 potato167
提出日時 2023-04-28 03:50:10
言語 C++17(gcc12)
(gcc 12.4.0 + boost 1.90.0)
コンパイル:
g++-12 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 509 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 6,353 ms
コンパイル使用メモリ 336,424 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-06-30 10:58:35
合計ジャッジ時間 6,818 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 8 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include "testlib.h"
using namespace std;
const int MIN_T=1;
const int MAX_T=50'000;
const int MIN_N=3;
const int MAX_N=100'000;
const int MAX_S=100'000;
int main(int argc,char** argv){
	registerValidation(argc,argv);
	int T=inf.readInt(MIN_T,MAX_T);
	inf.readEoln();
	int S=0;
	for(int i=0;i<T;i++){
		int N=inf.readInt(MIN_N,MAX_N);
		inf.readEoln();
		S+=N;
		ensure(S<=MAX_S);
		string s=inf.readLine("[0 1 ?]{" + std::to_string(N) + "}");
		//inf.readEoln();
	}
	inf.readEof();
}
0