結果

問題 No.2502 Optimization in the Dark
ユーザー keisuke6keisuke6
提出日時 2023-10-13 21:34:16
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 830 bytes
コンパイル時間 3,945 ms
コンパイル使用メモリ 205,400 KB
実行使用メモリ 24,324 KB
平均クエリ数 4.00
最終ジャッジ日時 2023-10-13 21:34:24
合計ジャッジ時間 6,094 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 26 ms
23,436 KB
testcase_02 AC 26 ms
24,024 KB
testcase_03 AC 27 ms
23,676 KB
testcase_04 AC 26 ms
23,544 KB
testcase_05 AC 26 ms
23,388 KB
testcase_06 AC 27 ms
23,460 KB
testcase_07 AC 27 ms
24,228 KB
testcase_08 AC 26 ms
23,844 KB
testcase_09 AC 26 ms
23,844 KB
testcase_10 AC 27 ms
23,844 KB
testcase_11 AC 26 ms
24,036 KB
testcase_12 AC 27 ms
23,496 KB
testcase_13 AC 27 ms
24,156 KB
testcase_14 AC 25 ms
24,180 KB
testcase_15 AC 24 ms
23,844 KB
testcase_16 AC 25 ms
23,484 KB
testcase_17 AC 24 ms
23,628 KB
testcase_18 AC 24 ms
23,856 KB
testcase_19 AC 25 ms
23,904 KB
testcase_20 AC 25 ms
24,168 KB
testcase_21 AC 25 ms
23,388 KB
testcase_22 AC 26 ms
24,096 KB
testcase_23 AC 27 ms
23,388 KB
testcase_24 AC 25 ms
23,664 KB
testcase_25 AC 26 ms
23,400 KB
testcase_26 AC 26 ms
23,460 KB
testcase_27 AC 26 ms
23,400 KB
testcase_28 AC 26 ms
23,844 KB
testcase_29 AC 25 ms
23,256 KB
testcase_30 AC 25 ms
23,496 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 == "No" ? 1 : 2);
    cout<<'?'<<' '<<a<<' '<<2*N<<' '<<3<<' '<<2*N<<endl;
    cin>>s;
    a = (s == "No" ? a : 3);
    set<int> st;
    st.insert(1);
    st.insert(2);
    st.insert(3);
    st.erase(a);
    cout<<'?'<<' '<<(*st.begin())<<' '<<N<<' '<<(*st.rbegin())<<' '<<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<<' '<<a<<' ';
    	cout<<c<<' '<<a<<' ';
    }
    for(int i=0;i<N;i++){
    	cout<<b<<' '<<c<<' ';
    }
    cout<<endl;
}
0