結果
| 問題 |
No.355 数当てゲーム(2)
|
| コンテスト | |
| ユーザー |
peroon
|
| 提出日時 | 2019-04-24 08:13:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,186 bytes |
| コンパイル時間 | 1,769 ms |
| コンパイル使用メモリ | 172,868 KB |
| 実行使用メモリ | 39,644 KB |
| 最終ジャッジ日時 | 2024-07-16 17:08:52 |
| 合計ジャッジ時間 | 8,226 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 51 |
ソースコード
#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;
FOR(i, 0, 10){
FOR(j, i+1, 10){
FOR(k, j+1, 10){
FOR(l, k+1, 10){
Q.push_back(i);
Q.push_back(j);
Q.push_back(k);
Q.push_back(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;
}
peroon