結果

問題 No.355 数当てゲーム(2)
ユーザー h_nosonh_noson
提出日時 2016-04-06 20:25:20
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,237 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 63,056 KB
実行使用メモリ 24,516 KB
平均クエリ数 31.29
最終ジャッジ日時 2023-09-23 10:17:36
合計ジャッジ時間 5,274 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 26 ms
23,664 KB
testcase_02 AC 24 ms
23,472 KB
testcase_03 AC 25 ms
23,376 KB
testcase_04 AC 26 ms
23,652 KB
testcase_05 AC 24 ms
23,976 KB
testcase_06 AC 26 ms
23,976 KB
testcase_07 AC 25 ms
23,580 KB
testcase_08 AC 24 ms
23,532 KB
testcase_09 AC 28 ms
24,324 KB
testcase_10 AC 25 ms
23,796 KB
testcase_11 AC 25 ms
23,796 KB
testcase_12 AC 26 ms
24,324 KB
testcase_13 AC 26 ms
24,276 KB
testcase_14 WA -
testcase_15 AC 25 ms
23,328 KB
testcase_16 AC 26 ms
23,628 KB
testcase_17 AC 25 ms
24,024 KB
testcase_18 AC 24 ms
23,532 KB
testcase_19 AC 25 ms
23,364 KB
testcase_20 AC 25 ms
23,400 KB
testcase_21 AC 28 ms
23,772 KB
testcase_22 AC 25 ms
24,276 KB
testcase_23 AC 25 ms
24,312 KB
testcase_24 AC 25 ms
23,412 KB
testcase_25 AC 25 ms
23,580 KB
testcase_26 AC 24 ms
23,784 KB
testcase_27 AC 25 ms
24,048 KB
testcase_28 AC 24 ms
23,484 KB
testcase_29 AC 26 ms
23,580 KB
testcase_30 AC 25 ms
23,316 KB
testcase_31 AC 25 ms
23,352 KB
testcase_32 AC 25 ms
24,024 KB
testcase_33 AC 25 ms
23,412 KB
testcase_34 AC 26 ms
23,328 KB
testcase_35 WA -
testcase_36 AC 26 ms
24,048 KB
testcase_37 AC 25 ms
23,796 KB
testcase_38 AC 25 ms
23,568 KB
testcase_39 AC 26 ms
24,000 KB
testcase_40 AC 25 ms
24,276 KB
testcase_41 AC 27 ms
23,664 KB
testcase_42 WA -
testcase_43 AC 28 ms
24,024 KB
testcase_44 AC 27 ms
24,036 KB
testcase_45 AC 29 ms
24,024 KB
testcase_46 AC 28 ms
23,964 KB
testcase_47 WA -
testcase_48 AC 25 ms
23,376 KB
testcase_49 AC 25 ms
23,532 KB
testcase_50 AC 25 ms
23,976 KB
testcase_51 AC 26 ms
23,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

typedef long long ll;

void out(int n1, int n2, int n3, int n4) {
    cout << n1 << " " << n2 << " " << n3 << " " << n4 << endl;
}

int main() {
    int i, j, k, l, x, y, mx;
    int n[4];
    mx = 0;
    rep (i,7) {
        out(i,7,8,9);
        cin >> x >> y;
        if (mx < x+y) {
            n[0] = i;
            mx = x+y;
        }
    }
    mx = 0;
    REP (i,n[0]+1,8) {
        out(n[0],i,8,9);
        cin >> x >> y;
        if (mx < x+y) {
            n[1] = i;
            mx = x+y;
        }
    }
    mx = 0;
    REP (i,n[1]+1,9) {
        out(n[0],n[1],i,9);
        cin >> x >> y;
        if (mx < x+y) {
            n[2] = i;
            mx = x+y;
        }
    }
    mx = 0;
    REP (i,n[2]+1,10) {
        out(n[0],n[1],n[2],i);
        cin >> x >> y;
        if (mx < x+y) {
            n[3] = i;
            mx = x+y;
        }
    }
    do {
        out(n[0],n[1],n[2],n[3]);
        cin >> x >> y;
    } while (x != 4 && next_permutation(n,n+4));
    return 0;
}
0