Untitled

 avatar
unknown
plain_text
3 years ago
812 B
4
Indexable
#include <bits/stdc++.h>
#define ll long long
#define db long double
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define all(a) a.begin(), a.end()

using namespace std;



int main(int argc, char *argv[]){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  srand(atoi(argv[1]));

  int n = 100000;
  int cc = 3;
  int q = 100000;
  cout << n << " " << q << endl;

  for (int i = 0; i < n; ++i) {
    cout << rand() % cc + 1 << " ";
  }
  cout << endl;

  for (int i = 2; i <= n; ++i) {
    cout << i << " " << rand() % (i - 1) + 1 << endl;
  }

  for (int i = 0; i < q; ++i) {
    if (rand()%2) {
      cout << "U " << rand()%n + 1 << " " << rand()%cc + 1 << endl;
    }
    else {
      cout << "S " << rand()%n+1 << " " << rand()%n + 1 << " " << rand()%cc + 1 << endl;
    }
  }

}
Editor is loading...