結果

問題 No.355 数当てゲーム(2)
ユーザー furafura
提出日時 2020-05-15 00:16:30
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 647 bytes
コンパイル時間 1,887 ms
コンパイル使用メモリ 199,388 KB
実行使用メモリ 24,492 KB
平均クエリ数 37.00
最終ジャッジ日時 2023-09-24 03:33:36
合計ジャッジ時間 7,401 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
23,376 KB
testcase_01 WA -
testcase_02 AC 25 ms
24,324 KB
testcase_03 AC 26 ms
23,832 KB
testcase_04 AC 26 ms
24,024 KB
testcase_05 WA -
testcase_06 AC 25 ms
23,376 KB
testcase_07 AC 26 ms
23,520 KB
testcase_08 AC 25 ms
24,264 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 24 ms
23,820 KB
testcase_12 AC 25 ms
24,264 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 27 ms
23,628 KB
testcase_16 AC 27 ms
23,424 KB
testcase_17 AC 24 ms
23,412 KB
testcase_18 AC 25 ms
23,832 KB
testcase_19 AC 24 ms
23,424 KB
testcase_20 AC 26 ms
24,384 KB
testcase_21 AC 24 ms
23,844 KB
testcase_22 AC 25 ms
24,060 KB
testcase_23 AC 26 ms
23,652 KB
testcase_24 AC 25 ms
24,360 KB
testcase_25 AC 24 ms
24,048 KB
testcase_26 AC 24 ms
24,372 KB
testcase_27 AC 24 ms
24,048 KB
testcase_28 AC 25 ms
24,276 KB
testcase_29 AC 25 ms
24,384 KB
testcase_30 AC 25 ms
24,000 KB
testcase_31 AC 25 ms
23,664 KB
testcase_32 AC 24 ms
24,288 KB
testcase_33 AC 25 ms
23,520 KB
testcase_34 AC 24 ms
23,424 KB
testcase_35 WA -
testcase_36 AC 26 ms
23,376 KB
testcase_37 AC 25 ms
23,820 KB
testcase_38 AC 28 ms
23,412 KB
testcase_39 AC 26 ms
23,616 KB
testcase_40 AC 25 ms
24,024 KB
testcase_41 AC 24 ms
24,060 KB
testcase_42 AC 25 ms
23,412 KB
testcase_43 AC 25 ms
23,952 KB
testcase_44 AC 26 ms
23,532 KB
testcase_45 AC 24 ms
23,640 KB
testcase_46 AC 24 ms
23,376 KB
testcase_47 AC 25 ms
24,324 KB
testcase_48 AC 25 ms
24,048 KB
testcase_49 AC 24 ms
23,376 KB
testcase_50 AC 25 ms
24,048 KB
testcase_51 AC 24 ms
23,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int ask(int a,int b,int c,int d,int t){
	int x[4]={a,b,c,d};
	rotate(x,x+(4-t)%4,x+4);
	printf("%d %d %d %d\n",x[0],x[1],x[2],x[3]);
	fflush(stdout);
	int res; scanf("%d%*d",&res);
	return res;
}

int main(){
	int ans[4];
	rep(t,4){
		int res[10];
		for(int a=1;a<=9;a++){
			if(a<=6) res[a]=ask(a,7,8,9,t);
			else     res[a]=ask(a,1,2,3,t);
		}
		if(*max_element(res+1,res+7)==*min_element(res+1,res+7)){
			ans[t]=max_element(res+7,res+10)-res;
		}
		else{
			ans[t]=max_element(res+1,res+7)-res;
		}
	}
	ask(ans[0],ans[1],ans[2],ans[3],0);

	return 0;
}
0