結果

問題 No.2502 Optimization in the Dark
ユーザー keisuke6keisuke6
提出日時 2023-10-13 21:28:33
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 836 bytes
コンパイル時間 2,217 ms
コンパイル使用メモリ 207,752 KB
実行使用メモリ 24,492 KB
平均クエリ数 4.00
最終ジャッジ日時 2023-10-13 21:28:40
合計ジャッジ時間 5,798 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,664 KB
testcase_01 AC 27 ms
24,216 KB
testcase_02 AC 26 ms
23,316 KB
testcase_03 AC 26 ms
23,280 KB
testcase_04 AC 26 ms
24,156 KB
testcase_05 AC 26 ms
24,276 KB
testcase_06 AC 26 ms
23,388 KB
testcase_07 AC 26 ms
24,372 KB
testcase_08 AC 26 ms
23,424 KB
testcase_09 AC 27 ms
24,228 KB
testcase_10 AC 27 ms
24,204 KB
testcase_11 AC 28 ms
23,652 KB
testcase_12 AC 26 ms
24,204 KB
testcase_13 AC 26 ms
23,856 KB
testcase_14 AC 27 ms
23,520 KB
testcase_15 AC 27 ms
23,292 KB
testcase_16 AC 26 ms
23,676 KB
testcase_17 AC 26 ms
23,448 KB
testcase_18 AC 26 ms
23,304 KB
testcase_19 AC 27 ms
23,532 KB
testcase_20 AC 27 ms
24,252 KB
testcase_21 AC 27 ms
23,724 KB
testcase_22 AC 26 ms
24,024 KB
testcase_23 AC 27 ms
24,048 KB
testcase_24 AC 27 ms
24,156 KB
testcase_25 AC 26 ms
24,204 KB
testcase_26 AC 27 ms
24,036 KB
testcase_27 AC 27 ms
23,244 KB
testcase_28 AC 27 ms
23,916 KB
testcase_29 AC 26 ms
23,724 KB
testcase_30 AC 27 ms
24,372 KB
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 -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
int mod = 998244353;
signed main(){
    int N;
    cin>>N;
    int a = 1;
    cout<<'?'<<' '<<1<<' '<<2*N<<' '<<2<<' '<<2*N<<endl;
    string s;
    cin>>s;
    a = (s == "Yes" ? 1 : 2);
    cout<<'?'<<' '<<a<<' '<<2*N<<' '<<3<<' '<<2*N<<endl;
    cin>>s;
    a = (s == "Yes" ? a : 3);
    set<int> st;
    st.insert(1);
    st.insert(2);
    st.insert(3);
    st.erase(a);
    cout<<'?'<<' '<<(*st.begin())<<' '<<2*N<<' '<<(*st.rbegin())<<' '<<2*N<<endl;
    cin>>s;
    int c = (s == "Yes" ? (*st.rbegin()) : (*st.begin()));
    int b = (s == "Yes" ? (*st.begin()) : (*st.rbegin()));
    cout<<'!'<<' ';
    for(int i=0;i<N;i++){
    	cout<<b<<' '<<c<<' ';
    	cout<<a<<' '<<c<<' ';
    }
    for(int i=0;i<N;i++){
    	cout<<a<<' '<<b<<' ';
    }
    cout<<endl;
}
0