結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2015-11-27 22:48:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 594 bytes |
| コンパイル時間 | 423 ms |
| コンパイル使用メモリ | 55,256 KB |
| 実行使用メモリ | 38,832 KB |
| 最終ジャッジ日時 | 2024-07-16 21:47:42 |
| 合計ジャッジ時間 | 6,843 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 12 |
ソースコード
#include<iostream>
#include<string>
void print(int pass[]) {
for (int i = 0; i < 10; i++) {
std::cout << pass[i];
}
std::cout << std::endl;
}
int main() {
int pass[] = {0,0,0,0,0,0,0,0,0,0};
int ans = 0;
std::string s;
print(pass);
std::cin >> ans >> s;
while (ans != 10) {
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
int tmp;
std::string stmp;
pass[i] = j;
print(pass);
std::cin >> tmp >> stmp;
if (stmp == "10") return 0;
if (tmp > ans) break;
if (tmp < ans) {
pass[i] -= 1;
break;
}
}
}
}
return 0;
}
hanorver