結果

問題 No.305 鍵(2)
ユーザー aaaaaaiuaaaaaaiu
提出日時 2019-08-12 17:46:27
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 499 bytes
コンパイル時間 1,723 ms
コンパイル使用メモリ 197,688 KB
実行使用メモリ 24,348 KB
平均クエリ数 52.15
最終ジャッジ日時 2023-09-24 02:18:50
合計ジャッジ時間 2,922 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,000 KB
testcase_01 AC 25 ms
24,000 KB
testcase_02 AC 24 ms
23,388 KB
testcase_03 AC 22 ms
24,288 KB
testcase_04 AC 23 ms
23,388 KB
testcase_05 AC 24 ms
23,988 KB
testcase_06 AC 21 ms
23,640 KB
testcase_07 AC 22 ms
23,796 KB
testcase_08 AC 23 ms
24,000 KB
testcase_09 AC 22 ms
23,508 KB
testcase_10 AC 21 ms
23,808 KB
testcase_11 AC 23 ms
24,348 KB
testcase_12 AC 22 ms
23,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0