結果

問題 No.2502 Optimization in the Dark
ユーザー kotatsugamekotatsugame
提出日時 2023-10-13 21:56:34
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 633 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 71,228 KB
実行使用メモリ 24,276 KB
平均クエリ数 4.00
最終ジャッジ日時 2023-10-13 21:56:40
合計ジャッジ時間 4,542 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,448 KB
testcase_01 AC 24 ms
23,700 KB
testcase_02 AC 24 ms
23,520 KB
testcase_03 AC 24 ms
23,268 KB
testcase_04 AC 25 ms
24,240 KB
testcase_05 AC 25 ms
23,568 KB
testcase_06 AC 25 ms
23,688 KB
testcase_07 AC 25 ms
23,580 KB
testcase_08 AC 24 ms
23,556 KB
testcase_09 AC 24 ms
23,412 KB
testcase_10 AC 25 ms
23,892 KB
testcase_11 AC 25 ms
23,760 KB
testcase_12 AC 25 ms
23,280 KB
testcase_13 AC 25 ms
23,688 KB
testcase_14 AC 25 ms
23,496 KB
testcase_15 AC 24 ms
23,388 KB
testcase_16 AC 25 ms
23,520 KB
testcase_17 AC 26 ms
23,520 KB
testcase_18 AC 24 ms
23,340 KB
testcase_19 AC 25 ms
23,280 KB
testcase_20 AC 24 ms
23,892 KB
testcase_21 AC 23 ms
23,460 KB
testcase_22 AC 24 ms
24,276 KB
testcase_23 AC 24 ms
23,448 KB
testcase_24 AC 25 ms
23,544 KB
testcase_25 AC 24 ms
23,460 KB
testcase_26 AC 25 ms
24,240 KB
testcase_27 AC 25 ms
23,748 KB
testcase_28 AC 25 ms
23,496 KB
testcase_29 AC 25 ms
23,448 KB
testcase_30 AC 24 ms
23,304 KB
testcase_31 AC 25 ms
23,484 KB
testcase_32 AC 25 ms
23,280 KB
testcase_33 AC 25 ms
24,216 KB
testcase_34 AC 25 ms
24,204 KB
testcase_35 AC 25 ms
23,232 KB
testcase_36 AC 25 ms
24,228 KB
testcase_37 AC 25 ms
24,228 KB
testcase_38 AC 26 ms
23,508 KB
testcase_39 AC 25 ms
23,880 KB
testcase_40 AC 25 ms
23,268 KB
testcase_41 AC 25 ms
24,216 KB
testcase_42 AC 25 ms
23,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<cassert>
using namespace std;
int N;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cin>>N;
	int mxi=1;
	for(int i=2;i<=3;i++)
	{
		cout<<"? "<<mxi<<" "<<2*N<<" "<<i<<" "<<2*N<<endl;
		string s;cin>>s;
		if(s=="Yes")mxi=i;
	}
	int A,B;
	if(mxi==1)A=2,B=3;
	else if(mxi==2)A=1,B=3;
	else A=1,B=2;
	cout<<"? "<<A<<" "<<N<<" "<<B<<" "<<N<<endl;
	string s;cin>>s;
	if(s=="Yes");
	else swap(A,B);
	cout<<"!";
	for(int i=0;i<N;i++)cout<<" "<<B<<" "<<mxi;
	for(int i=0;i<N;i++)cout<<" "<<A<<" "<<mxi;
	for(int i=0;i<N;i++)cout<<" "<<A<<" "<<B;
	cout<<endl;
}
0