結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,084 KB
testcase_01 AC 43 ms
23,688 KB
testcase_02 AC 47 ms
24,048 KB
testcase_03 AC 28 ms
23,712 KB
testcase_04 AC 36 ms
23,448 KB
testcase_05 AC 54 ms
23,592 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