# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869813 | rainboy | Subway (info1cup19_subway) | C11 | 0 ms | 348 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 <stdio.h>
int main() {
int n, m, i;
scanf("%d", &m);
n = 0;
while (n * (n - 1) / 2 < m)
n++;
printf("%d\n", n);
for (i = 0; i < n - 1; i++)
printf("%d %d\n", i, i - 1);
printf("%d %d\n", n - 1, m - 1 - (n - 1) * (n - 2) / 2);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |