結果

問題 No.355 数当てゲーム(2)
ユーザー peroonperoon
提出日時 2019-04-24 08:15:05
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,165 bytes
コンパイル時間 1,486 ms
コンパイル使用メモリ 167,220 KB
実行使用メモリ 24,444 KB
平均クエリ数 191.35
最終ジャッジ日時 2023-09-23 17:15:43
合計ジャッジ時間 13,056 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 26 ms
24,012 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 26 ms
23,388 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 27 ms
23,424 KB
testcase_10 AC 28 ms
24,024 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 27 ms
23,976 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 29 ms
23,364 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 27 ms
23,388 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;

#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define br() p("")
#define pn(s) cout << (#s) << " " << (s) << endl
#define p_yes() p("Yes")
#define p_no() p("No")

void query(vector<ll> Q){
    cout << Q[0];
    FOR(i, 1, 4){
        cout << " " << Q[i];
    }
    cout << endl;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    vector<ll> Q(4);
    FOR(i, 0, 10){
        FOR(j, i+1, 10){
            FOR(k, j+1, 10){
                FOR(l, k+1, 10){
                    Q[0] = i;
                    Q[1] = j;
                    Q[2] = k;
                    Q[3] = l;
                    query(Q);

                    ll x, y;
                    cin >> x >> y;
                    if(x+y==4){
                        goto HERE;
                    }
                }
            }
        }
    }
HERE:
    do {
        query(Q);
        ll x, y;
        cin >> x >> y;
        if(x==4) return 0;
    } while (next_permutation(ALL(Q)));
    
    return 0;
}
0