結果

問題 No.355 数当てゲーム(2)
ユーザー めうめう🎒めうめう🎒
提出日時 2016-04-01 22:42:57
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,510 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 74,420 KB
実行使用メモリ 24,384 KB
平均クエリ数 104.08
最終ジャッジ日時 2023-09-23 09:11:24
合計ジャッジ時間 7,384 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,616 KB
testcase_01 WA -
testcase_02 AC 26 ms
24,048 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 28 ms
24,216 KB
testcase_07 AC 27 ms
24,384 KB
testcase_08 AC 26 ms
23,760 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 24 ms
24,000 KB
testcase_15 AC 25 ms
24,048 KB
testcase_16 AC 27 ms
23,304 KB
testcase_17 AC 27 ms
23,832 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 27 ms
23,820 KB
testcase_21 AC 27 ms
23,988 KB
testcase_22 AC 27 ms
23,592 KB
testcase_23 AC 27 ms
23,688 KB
testcase_24 AC 28 ms
24,000 KB
testcase_25 WA -
testcase_26 AC 26 ms
23,328 KB
testcase_27 AC 27 ms
23,544 KB
testcase_28 AC 27 ms
23,328 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 26 ms
24,384 KB
testcase_33 AC 27 ms
24,012 KB
testcase_34 WA -
testcase_35 AC 25 ms
23,316 KB
testcase_36 AC 27 ms
23,784 KB
testcase_37 AC 27 ms
23,400 KB
testcase_38 AC 26 ms
23,832 KB
testcase_39 AC 28 ms
24,036 KB
testcase_40 AC 27 ms
23,652 KB
testcase_41 AC 28 ms
23,400 KB
testcase_42 AC 29 ms
23,964 KB
testcase_43 AC 27 ms
23,484 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 26 ms
23,772 KB
testcase_48 AC 29 ms
23,340 KB
testcase_49 AC 28 ms
24,216 KB
testcase_50 WA -
testcase_51 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;

#define ll long long
#define INF (1 << 30)
#define INFLL (1LL << 60)

int main() {
	bool not_num[10] = {};
	int use_num[4] = {};
	int X,Y;
	while(true){
		for(int i = 0;i < 10;i++){
			if(not_num[i]) continue;
			for(int j = i + 1;j < 10;j++){
				if(not_num[j]) continue;
				for(int k = j + 1;k < 10;k++){
					for(int l = k + 1;l < 10;l++){
						cout << i << " " << j << " " << k << " " << l << endl;
						cin >> X >> Y;
						if(X == 0 && Y == 0){
							not_num[i] = true;
							not_num[j] = true;
							not_num[k] = true;
							not_num[l] = true;
						}
						if(X == 4) break;
					}
					if(X == 4) break;
				}
				if(X == 4) break;
			}
			if(X == 4) break;
		}
		if(X == 4) break;
		int how = 0;
		for(int i = 0;i < 10;i++){
			if(not_num[i] == false){
				use_num[how] = i;
				how++;
			}
		}
		for(int i = 0;i < 4;i++){
			for(int j = 0;j < 4;j++){
				if(i == j) continue;
				for(int k = 0;k < 4;k++){
					if(k == i || k == j) continue;
					for(int l = 0;l < 4;l++){
						if(l == i || l == j || l == k) continue;
						cout << use_num[i] << " " << use_num[j] << " " << use_num[k] << " " << use_num[l] << endl;
						cin >> X >> Y;
						if(X == 4) break;
					}
					if(X == 4) break;
				}
				if(X == 4) break;
			}
			if(X == 4) break;
		}
		break;
	}
	return 0;
}
0