結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-12 17:46:27 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 499 bytes |
| コンパイル時間 | 2,368 ms |
| コンパイル使用メモリ | 193,792 KB |
| 最終ジャッジ日時 | 2025-01-07 11:46:14 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s="0000000000";
cout<<s<<endl;
int a;string t;
cin>>a>>t;
if (a==10) return 0;
int i=0;
s[i]++;
while (true) {
cout<<s<<endl;
int b;
cin>>b>>t;
if (b==10) break;
if (b>a) {
a=b;
i++;
} else if (b<a) {
s[i]--;
i++;
} else {
s[i]++;
}
}
return 0;
}