Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "testlib.h"
- //#include "jngen.h"
- #include <bits/stdc++.h>
- #define forn(i, n) for (int i = 0; i < int(n); i++)
- using namespace std;
- int main(int argc, char* argv[]) {
- registerGen(argc, argv, 1);
- int n = 83160, m = 200000;
- set<pair<int, int>> res;
- forn(i, m){
- int x, y;
- do{
- x = rnd.next(n);
- y = rnd.next(n - 1);
- if (y >= x) ++y;
- } while (res.count({x, y}) || res.count({y, x}));
- res.insert({x, y});
- }
- printf("%d %d\n", n, m);
- for (auto it : res)
- printf("%d %d\n", it.first + 1, it.second + 1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement