Submission #1003828

#TimeUsernameProblemLanguageResultExecution timeMemory
1003828vjudge1Zagrade (COI20_zagrade)C++17
0 / 100
1159 ms412 KiB
#include <bits/stdc++.h> using namespace std; const int MAXN = 1005; int marc[MAXN]; int main(){ int n,q; cin>>n>>q; for(int i = 1; i <= n; i++){ if(marc[i])continue; for(int j = i+1; j <= n; j++) if(!marc[j]){ cout<<"? "<<i<<" "<<j<<endl; int x; cin>>x; if(x){ marc[j] = 1; break; } } } cout<<"! "; for(int i = 1; i <= n; i++){ if(marc[i] == 0)cout<<"("; else cout<<")"; }cout<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...