結果

問題 No.355 数当てゲーム(2)
ユーザー naimonon77naimonon77
提出日時 2016-09-03 03:28:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,002 bytes
コンパイル時間 1,530 ms
コンパイル使用メモリ 167,736 KB
実行使用メモリ 24,516 KB
平均クエリ数 174.54
最終ジャッジ日時 2023-09-23 11:25:11
合計ジャッジ時間 11,232 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 26 ms
23,376 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 26 ms
23,556 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 28 ms
23,424 KB
testcase_10 AC 28 ms
24,360 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 27 ms
24,384 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 27 ms
24,312 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 28 ms
23,400 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
#define ll long long
#define ull unsigned ll
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not a)
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
bool test = 0;
int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
#define MAX (int)1e6 + 5

ll x, y;

signed main(void) {
	ll i, j, k, l;
	rep(i, 10) REP(j, i + 1, 10) REP(k, j + 1, 10) REP(l, k + 1, 10) {
		cout << i << " " << j << " ";
		cout << k << " " << l << endl;
		cin >> x >> y;
		if (x + y == 4) goto part2;
	}

part2:;
	vector<ll> tmp_ans = { i,j,k,l };
	do {
		rep(i, tmp_ans.size()-1) {
			cout << tmp_ans[i] << " ";
		}
		cout << tmp_ans[tmp_ans.size() - 1] << endl;
		cin >> x >> y;
		if (x == 4) return 0;
	} while (next_permutation(ALL(tmp_ans)));
}
0