Submission #706260

# Submission time Handle Problem Language Result Execution time Memory
706260 2023-03-06T08:11:16 Z vjudge1 Nizovi (COI14_nizovi) C++17
0 / 100
1 ms 208 KB
#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 time Memory Grader output
1 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
2 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
3 Execution timed out 0 ms 208 KB Time limit exceeded (wall clock)
4 Execution timed out 0 ms 208 KB Time limit exceeded (wall clock)
5 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
6 Execution timed out 0 ms 208 KB Time limit exceeded (wall clock)
7 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
8 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
9 Execution timed out 0 ms 208 KB Time limit exceeded (wall clock)
10 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)