結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-27 23:01:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 721 bytes |
| コンパイル時間 | 574 ms |
| コンパイル使用メモリ | 55,552 KB |
| 実行使用メモリ | 25,716 KB |
| 平均クエリ数 | 61.38 |
| 最終ジャッジ日時 | 2024-07-16 06:41:05 |
| 合計ジャッジ時間 | 3,950 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 13 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
void out(int *ans)
{
for (int i = 0; i < 10; i++) {
cout << ans[i];
}
cout << endl;
}
int main()
{
int ans[10];
int fixed[10];
for (int i = 0; i < 10; i++) {
ans[i] = 0;
fixed[i] = 0;
}
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
if (!fixed[j]) ans[j] = i;
}
out(ans);
int count;
string s;
cin >> count >> s;
for (int k = 0; k < 10; k++) {
if (ans[k] == i) {
if(i>0) ans[k] = 0;
else ans[k] = 1;
int n; string ss;
out(ans);
cin >> n >> ss;
if (n != count) {
fixed[k] = 1;
ans[k] = i;
}
}
}
}
out(ans);
int count; string s;
cin >> count >> s;
return 0;
}