Submission #706260

#TimeUsernameProblemLanguageResultExecution timeMemory
706260vjudge1Nizovi (COI14_nizovi)C++17
0 / 100
1 ms208 KiB
#include <bits/stdc++.h> #define endl '\n' #define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define int ll typedef long long ll; using namespace std; const int N = 200000 + 10; signed main() { FAST; int n, m; cin >> n >> m; int idx = n + 1; int right = n + m; while(idx--) { if(idx == 0) { cout << "end" << endl; return 0; } int last = idx; for(int i = idx + 1; idx < right; i++) { cout << "cmp " << idx << ' ' << i << endl; int x; cin >> x; last = i; if(x == -1 || x == 0) break; } right = last - 1; for(int i = idx; i < last - 1; i++) { cout << "reverse " << i << ' ' << i + 1 << endl; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...