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