結果

問題 No.305 鍵(2)
ユーザー h_nosonh_noson
提出日時 2016-03-13 13:57:43
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 712 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 62,368 KB
実行使用メモリ 24,036 KB
平均クエリ数 86.69
最終ジャッジ日時 2023-09-23 23:19:23
合計ジャッジ時間 1,614 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
23,412 KB
testcase_01 AC 23 ms
23,388 KB
testcase_02 AC 24 ms
23,424 KB
testcase_03 AC 23 ms
23,520 KB
testcase_04 AC 22 ms
23,376 KB
testcase_05 AC 22 ms
23,400 KB
testcase_06 AC 20 ms
23,364 KB
testcase_07 AC 23 ms
23,640 KB
testcase_08 AC 24 ms
24,036 KB
testcase_09 AC 22 ms
23,376 KB
testcase_10 AC 21 ms
23,832 KB
testcase_11 AC 21 ms
23,652 KB
testcase_12 AC 22 ms
23,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

#define RREP(i,s,e) for (i = e-1; i >= s; i--)
#define rrep(i,n) RREP(i,0,n)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 1e8

typedef long long ll;

int main() {
    int i, j, x;
    string res, s = "0000000000";
    rep (i,10) {
        int y;
        string t = s;
        cout << t << endl;
        cin >> x >> res;
        if (x == 10)
            return 0;
        rep (j,9) {
            t[i]++;
            cout << t << endl;
            cin >> y >> res;
            if (y == 10)
                return 0;
            if (x < y)
                s = t;
        }
    }
    return 0;
}

0