結果

問題 No.304 鍵(1)
ユーザー antaanta
提出日時 2015-11-27 23:39:13
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 68,992 KB
実行使用メモリ 24,336 KB
平均クエリ数 512.83
最終ジャッジ日時 2023-09-23 22:05:29
合計ジャッジ時間 1,473 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
23,832 KB
testcase_01 AC 30 ms
23,652 KB
testcase_02 AC 49 ms
24,336 KB
testcase_03 AC 34 ms
23,892 KB
testcase_04 AC 53 ms
23,532 KB
testcase_05 AC 41 ms
23,676 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