結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
QCFium
|
| 提出日時 | 2020-06-16 18:29:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 539 bytes |
| コンパイル時間 | 1,565 ms |
| コンパイル使用メモリ | 166,488 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 59.00 |
| 最終ジャッジ日時 | 2024-07-17 02:45:22 |
| 合計ジャッジ時間 | 2,756 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
int main() {
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