Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define pb push_back
- #define f first
- #define sc second
- using namespace std;
- typedef long long int ll;
- typedef string str;
- const int lim = 2e5;
- int main(){
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- int n = lim/2, q = lim;
- cout << n << " " << q << "\n";
- for(int i = 1; i < n; i++){
- if(i == n/2) continue;
- cout << "union " << i << " " << i+1 << "\n";
- q--;
- }
- n/=2;
- for(int i = 0; i < q; i++){
- if(i%2 == 0) cout << "persist\n";
- else if(i%2 == 1) cout << "union " << n << " " << n+1 << "\n";
- else cout << "rollback\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement