結果
問題 | No.2502 Optimization in the Dark |
ユーザー |
![]() |
提出日時 | 2023-10-13 21:34:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 830 bytes |
コンパイル時間 | 2,086 ms |
コンパイル使用メモリ | 201,336 KB |
最終ジャッジ日時 | 2025-02-17 07:09:11 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 WA * 13 |
ソースコード
#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; }