Submission #1003827

#TimeUsernameProblemLanguageResultExecution timeMemory
1003827vjudge1Zagrade (COI20_zagrade)C++17
0 / 100
1144 ms416 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<<"\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...