結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
24,324 KB
testcase_01 AC 25 ms
23,400 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 24 ms
23,556 KB
testcase_06 WA -
testcase_07 AC 25 ms
23,796 KB
testcase_08 AC 25 ms
24,324 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 25 ms
23,688 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 27 ms
23,388 KB
testcase_18 AC 27 ms
24,288 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 27 ms
23,556 KB
testcase_23 AC 24 ms
24,048 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 24 ms
23,412 KB
testcase_28 AC 24 ms
24,000 KB
testcase_29 WA -
testcase_30 WA -
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<<' ';
    	cout<<a<<' '<<b<<' ';
    }
}
0