제출 #1003829

#제출 시각아이디문제언어결과실행 시간메모리
1003829vjudge1Zagrade (COI20_zagrade)C++17
0 / 100
1071 ms416 KiB
#include <bits/stdc++.h> using namespace std; int marc[1005]; 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...