結果
| 問題 |
No.355 数当てゲーム(2)
|
| コンテスト | |
| ユーザー |
h_noson
|
| 提出日時 | 2016-04-06 20:25:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,237 bytes |
| コンパイル時間 | 538 ms |
| コンパイル使用メモリ | 60,680 KB |
| 実行使用メモリ | 25,616 KB |
| 平均クエリ数 | 31.29 |
| 最終ジャッジ日時 | 2024-07-16 09:47:20 |
| 合計ジャッジ時間 | 5,364 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 47 WA * 5 |
ソースコード
#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;
}
h_noson