結果

問題 No.304 鍵(1)
ユーザー antaanta
提出日時 2015-11-27 23:40:18
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 657 ms
コンパイル使用メモリ 68,480 KB
実行使用メモリ 24,408 KB
平均クエリ数 486.50
最終ジャッジ日時 2023-09-23 22:05:58
合計ジャッジ時間 1,492 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
23,700 KB
testcase_01 AC 34 ms
23,712 KB
testcase_02 AC 50 ms
24,048 KB
testcase_03 AC 31 ms
23,400 KB
testcase_04 AC 49 ms
24,408 KB
testcase_05 AC 43 ms
23,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <random>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <numeric>
using namespace std;

int main() {
	vector<int> v(1000);
	iota(v.begin(), v.end(), 0);
	default_random_engine re(random_device{}());
	shuffle(v.begin(), v.end(), re);
	for(int x : v) {
		printf("%03d\n", x);
		fflush(stdout);
		char buf[10];
		scanf("%s", buf);
		if(*buf == 'u')
			break;
	}
	return 0;
}
0