結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
QCFium
|
| 提出日時 | 2020-06-16 18:27:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 459 bytes |
| コンパイル時間 | 1,468 ms |
| コンパイル使用メモリ | 166,884 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 92.62 |
| 最終ジャッジ日時 | 2024-07-17 02:45:18 |
| 合計ジャッジ時間 | 2,782 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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) max = match, index = j;
tmp[i] -= j;
}
res[i] = index + '0';
}
puts(res);
return 0;
}
QCFium