# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124433 | 2019-07-03T10:35:10 Z | AyaBenSaad | Strange Device (APIO19_strange_device) | C++14 | 5000 ms | 524288 KB |
#include <bits/stdc++.h> #define ll long long // sub 4 using namespace std; const int M = 2e6 + 6; int n; ll a, b; ll l[M], r[M]; set <pair <ll, ll> >s; int main () { scanf ("%d %lld %lld", &n, &a, &b); for (int i = 0; i < n; i++) { scanf("%lld %lld", &l[i], &r[i]); for (long long j = l[i]; j <= r[i]; j++) { long long x = (j + (j/b)) % a; long long y = j % b; s.insert ({x, y}); } } printf("%d\n", (int)s.size()); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 76 ms | 12536 KB | Output is correct |
3 | Correct | 118 ms | 18396 KB | Output is correct |
4 | Correct | 4 ms | 888 KB | Output is correct |
5 | Correct | 2 ms | 348 KB | Output is correct |
6 | Correct | 3 ms | 376 KB | Output is correct |
7 | Correct | 3 ms | 504 KB | Output is correct |
8 | Correct | 3 ms | 504 KB | Output is correct |
9 | Correct | 12 ms | 1192 KB | Output is correct |
10 | Correct | 2 ms | 376 KB | Output is correct |
11 | Correct | 2 ms | 376 KB | Output is correct |
12 | Correct | 2 ms | 276 KB | Output is correct |
13 | Correct | 2 ms | 252 KB | Output is correct |
14 | Correct | 2 ms | 348 KB | Output is correct |
15 | Correct | 62 ms | 6976 KB | Output is correct |
16 | Correct | 46 ms | 7232 KB | Output is correct |
17 | Correct | 94 ms | 8896 KB | Output is correct |
18 | Correct | 2 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Runtime error | 3847 ms | 524288 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 207 ms | 32396 KB | Output is correct |
3 | Correct | 225 ms | 32176 KB | Output is correct |
4 | Correct | 202 ms | 30684 KB | Output is correct |
5 | Execution timed out | 5077 ms | 62712 KB | Time limit exceeded |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 776 ms | 78780 KB | Output is correct |
3 | Runtime error | 2931 ms | 524288 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 776 ms | 78780 KB | Output is correct |
3 | Runtime error | 2931 ms | 524288 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 776 ms | 78780 KB | Output is correct |
3 | Runtime error | 2931 ms | 524288 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 376 KB | Output is correct |
2 | Runtime error | 2036 ms | 524288 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 76 ms | 12536 KB | Output is correct |
3 | Correct | 118 ms | 18396 KB | Output is correct |
4 | Correct | 4 ms | 888 KB | Output is correct |
5 | Correct | 2 ms | 348 KB | Output is correct |
6 | Correct | 3 ms | 376 KB | Output is correct |
7 | Correct | 3 ms | 504 KB | Output is correct |
8 | Correct | 3 ms | 504 KB | Output is correct |
9 | Correct | 12 ms | 1192 KB | Output is correct |
10 | Correct | 2 ms | 376 KB | Output is correct |
11 | Correct | 2 ms | 376 KB | Output is correct |
12 | Correct | 2 ms | 276 KB | Output is correct |
13 | Correct | 2 ms | 252 KB | Output is correct |
14 | Correct | 2 ms | 348 KB | Output is correct |
15 | Correct | 62 ms | 6976 KB | Output is correct |
16 | Correct | 46 ms | 7232 KB | Output is correct |
17 | Correct | 94 ms | 8896 KB | Output is correct |
18 | Correct | 2 ms | 256 KB | Output is correct |
19 | Correct | 2 ms | 256 KB | Output is correct |
20 | Runtime error | 3847 ms | 524288 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
21 | Halted | 0 ms | 0 KB | - |