結果

問題 No.355 数当てゲーム(2)
ユーザー koyoprokoyopro
提出日時 2020-01-15 22:58:28
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,552 bytes
コンパイル時間 2,784 ms
コンパイル使用メモリ 143,920 KB
実行使用メモリ 24,504 KB
平均クエリ数 15.29
最終ジャッジ日時 2023-09-23 19:28:18
合計ジャッジ時間 11,822 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,132 KB
testcase_01 AC 26 ms
24,048 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 26 ms
23,556 KB
testcase_05 AC 25 ms
23,688 KB
testcase_06 AC 26 ms
23,268 KB
testcase_07 AC 25 ms
24,264 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 25 ms
23,664 KB
testcase_12 AC 26 ms
23,424 KB
testcase_13 WA -
testcase_14 AC 26 ms
23,232 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 26 ms
24,180 KB
testcase_18 AC 27 ms
23,460 KB
testcase_19 AC 26 ms
23,412 KB
testcase_20 AC 26 ms
23,568 KB
testcase_21 AC 26 ms
23,400 KB
testcase_22 AC 26 ms
23,784 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 26 ms
23,796 KB
testcase_27 WA -
testcase_28 AC 26 ms
23,472 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 25 ms
23,436 KB
testcase_32 WA -
testcase_33 AC 26 ms
23,652 KB
testcase_34 AC 26 ms
23,796 KB
testcase_35 AC 25 ms
23,412 KB
testcase_36 WA -
testcase_37 AC 26 ms
24,000 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 26 ms
23,436 KB
testcase_43 WA -
testcase_44 AC 25 ms
23,688 KB
testcase_45 AC 26 ms
23,652 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 25 ms
23,832 KB
testcase_50 AC 26 ms
23,400 KB
testcase_51 AC 26 ms
23,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define int long long
#define FOR(i, a, b) for(int i=(a);i<(b);i++)
#define RFOR(i, a, b) for(int i=(b-1);i>=(a);i--)
#define REP(i, n) for(int i=0; i<(n); i++)
#define RREP(i, n) for(int i=(n-1); i>=0; i--)
#define ALL(a) (a).begin(),(a).end()
#define UNIQUE_SORT(l) sort(ALL(l)); l.erase(unique(ALL(l)), l.end());
#define CONTAIN(a, b) find(ALL(a), (b)) != (a).end()
#define array2(type, x, y) array<array<type, y>, x>
#define vector2(type) vector<vector<type> >
#define out(...) printf(__VA_ARGS__);fflush(stdout);

int dxy[] = {0, 1, 0, -1, 0};

void solve();
signed main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    solve();
    return 0;
}

/*================================*/

int N,M,Q;

void solve() {
    int A[4];
    REP(i,4)A[i]=i;
    int S0,S1,T;
    int F[4];
    REP(i,4)F[i]=-1;
    while(true) {
        out("%lld %lld %lld %lld\n", A[0],A[1],A[2],A[3]);
        cin>>S0>>T;
        if (S0 == 4) return;
        if (S0) {
            REP(i,4) {
                if (F[i]>-1) continue;
                A[i] = (A[i]+4)%10;
                out("%lld %lld %lld %lld\n", A[0],A[1],A[2],A[3]);
                cin>>S1>>T;
                if (S1 == 4) return;
                A[i]=(A[i]+6)%10;
                if (S1!=S0) {
                    F[i]=A[i];
                }
            }
        }
        int ok = true;
        REP(i,4) ok = ok && F[i]>-1;
        if (ok) break;
        REP(i,4) A[i]=(A[i]+1)%10;
    }
    
    out("%lld %lld %lld %lld\n", F[0],F[1],F[2],F[3]);
}
0