結果
問題 |
No.305 鍵(2)
|
ユーザー |
![]() |
提出日時 | 2020-06-16 18:26:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 1,570 ms |
コンパイル使用メモリ | 165,216 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 101.00 |
最終ジャッジ日時 | 2024-07-17 03:50:09 |
合計ジャッジ時間 | 4,230 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 13 |
ソースコード
#include <bits/stdc++.h> int main() { char res[11] = { 0 }; char tmp[11]; memset(tmp, '0', sizeof(tmp)); for (int i = 0; i < 10; i++) { int max = -1, index = -1; for (int j = 0; j < 10; j++) { tmp[j] += j; puts(tmp); fflush(stdout); int match; scanf("%d%*s", &match); if (match == 10) return 0; if (match > max) max = match, index = j; tmp[j] -= j; } res[i] = index + '0'; } puts(res); return 0; }