Submission #1052325

#TimeUsernameProblemLanguageResultExecution timeMemory
1052325VMaksimoski008Zagrade (COI20_zagrade)C++17
0 / 100
493 ms600 KiB
#include <bits/stdc++.h> //#define int long long using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; const int mod = 1e9 + 7; const int LOG = 20; const int maxn = 1e5 + 5; int query(int a, int b) { cout << "? " << a << " " << b << endl; int x; cin >> x; return x; } signed main() { int n, q; cin >> n >> q; vector<int> t(n+1); for(int i=1; i+1<=n; i++) t[i+1] = t[i] ^ query(i, i+1); cout << "! "; for(int i=1; i<=n; i++) cout << (t[i] ? ')' : '('); 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...