# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
162956 | Minnakhmetov | Highway Tolls (IOI18_highway) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(time(0));
int ri(int l, int r) {
return rnd() % (r - l + 1) + l;
}
int main() {
freopen("input.txt", "w", stdout);
int n, m, a, b, s, t;
n = 6;
m = 12;
a = 1;
b = 2;
t = s = ri(0, n - 1);
while (t == s)
t = ri(0, n - 1);
cout << n << " " << m << " " << a << " " << b << " " << s << " " << t << "\n";
for (int i = 1; i < n; i++) {
cout << ri(0, i - 1) << " " << i << "\n";
}
for (int i = 0; i < m - n + 1; i++) {
int x = 0, y = 0;
while (x == y) {
x = ri(0, n - 1);
y = ri(0, n - 1);
}
cout << x << " " << y << "\n";
}
}