結果
問題 |
No.355 数当てゲーム(2)
|
ユーザー |
![]() |
提出日時 | 2019-04-24 08:15:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,165 bytes |
コンパイル時間 | 1,680 ms |
コンパイル使用メモリ | 170,176 KB |
実行使用メモリ | 25,616 KB |
平均クエリ数 | 191.35 |
最終ジャッジ日時 | 2024-07-16 17:09:31 |
合計ジャッジ時間 | 14,551 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 45 |
ソースコード
#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; }