結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,640 KB
testcase_01 WA -
testcase_02 AC 26 ms
23,796 KB
testcase_03 AC 27 ms
24,228 KB
testcase_04 AC 28 ms
23,568 KB
testcase_05 AC 28 ms
23,952 KB
testcase_06 AC 28 ms
23,340 KB
testcase_07 AC 26 ms
23,628 KB
testcase_08 AC 26 ms
23,964 KB
testcase_09 WA -
testcase_10 AC 27 ms
23,796 KB
testcase_11 AC 26 ms
24,012 KB
testcase_12 AC 26 ms
24,348 KB
testcase_13 AC 28 ms
24,216 KB
testcase_14 WA -
testcase_15 AC 26 ms
24,024 KB
testcase_16 AC 26 ms
23,508 KB
testcase_17 AC 27 ms
23,508 KB
testcase_18 AC 26 ms
23,544 KB
testcase_19 AC 26 ms
23,556 KB
testcase_20 AC 26 ms
24,012 KB
testcase_21 AC 25 ms
23,676 KB
testcase_22 AC 26 ms
24,264 KB
testcase_23 AC 25 ms
23,568 KB
testcase_24 AC 25 ms
24,288 KB
testcase_25 AC 25 ms
23,352 KB
testcase_26 AC 27 ms
24,168 KB
testcase_27 AC 25 ms
24,048 KB
testcase_28 AC 24 ms
24,348 KB
testcase_29 AC 25 ms
24,000 KB
testcase_30 AC 26 ms
24,072 KB
testcase_31 AC 26 ms
23,340 KB
testcase_32 AC 27 ms
23,796 KB
testcase_33 AC 26 ms
24,408 KB
testcase_34 AC 28 ms
23,568 KB
testcase_35 AC 25 ms
23,400 KB
testcase_36 AC 27 ms
23,340 KB
testcase_37 AC 26 ms
23,496 KB
testcase_38 AC 26 ms
23,592 KB
testcase_39 AC 27 ms
24,324 KB
testcase_40 AC 25 ms
23,592 KB
testcase_41 AC 25 ms
23,400 KB
testcase_42 AC 26 ms
23,952 KB
testcase_43 AC 25 ms
24,360 KB
testcase_44 AC 27 ms
24,384 KB
testcase_45 AC 27 ms
23,808 KB
testcase_46 AC 27 ms
23,940 KB
testcase_47 AC 25 ms
24,324 KB
testcase_48 AC 25 ms
23,808 KB
testcase_49 AC 24 ms
23,652 KB
testcase_50 AC 26 ms
24,048 KB
testcase_51 AC 25 ms
23,388 KB
権限があれば一括ダウンロードができます

ソースコード

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++){
					if(not_num[k]) continue;
					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;
						}else if(X >= 2 || Y >= 2){
							break;
						}
						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