# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
568784 | 2022-05-26T08:02:02 Z | birthdaycake | Strange Device (APIO19_strange_device) | C++17 | 5000 ms | 524288 KB |
#include<bits/stdc++.h> #define int long long #define endl '\n' #define mod 1000000007 #define boost ios_base::sync_with_stdio(false), cin.tie(NULL); using namespace std; pair<int,int>a[2000001]; signed main() { int n,A,B, ans = 0; cin >> n >> A >> B; set<pair<int,int>>x; for(int i = 0; i < n; i++){ cin >> a[i].first >> a[i].second; for(int j = a[i].first; j <= a[i].second; j++){ x.insert({(j + (j / B) ) % A, j % B}); } } cout << x.size(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 51 ms | 12464 KB | Output is correct |
3 | Correct | 80 ms | 18352 KB | Output is correct |
4 | Correct | 2 ms | 852 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
7 | Correct | 1 ms | 468 KB | Output is correct |
8 | Correct | 1 ms | 308 KB | Output is correct |
9 | Correct | 7 ms | 1204 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |
14 | Correct | 1 ms | 340 KB | Output is correct |
15 | Correct | 43 ms | 7020 KB | Output is correct |
16 | Correct | 42 ms | 7224 KB | Output is correct |
17 | Correct | 152 ms | 8796 KB | Output is correct |
18 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Runtime error | 2654 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 312 KB | Output is correct |
2 | Correct | 127 ms | 32180 KB | Output is correct |
3 | Correct | 173 ms | 32096 KB | Output is correct |
4 | Correct | 117 ms | 30556 KB | Output is correct |
5 | Execution timed out | 5039 ms | 62512 KB | Time limit exceeded |
6 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1484 ms | 78672 KB | Output is correct |
3 | Runtime error | 1787 ms | 524288 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1484 ms | 78672 KB | Output is correct |
3 | Runtime error | 1787 ms | 524288 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1484 ms | 78672 KB | Output is correct |
3 | Runtime error | 1787 ms | 524288 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Runtime error | 1315 ms | 524288 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 51 ms | 12464 KB | Output is correct |
3 | Correct | 80 ms | 18352 KB | Output is correct |
4 | Correct | 2 ms | 852 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
7 | Correct | 1 ms | 468 KB | Output is correct |
8 | Correct | 1 ms | 308 KB | Output is correct |
9 | Correct | 7 ms | 1204 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 212 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |
14 | Correct | 1 ms | 340 KB | Output is correct |
15 | Correct | 43 ms | 7020 KB | Output is correct |
16 | Correct | 42 ms | 7224 KB | Output is correct |
17 | Correct | 152 ms | 8796 KB | Output is correct |
18 | Correct | 1 ms | 212 KB | Output is correct |
19 | Correct | 0 ms | 212 KB | Output is correct |
20 | Runtime error | 2654 ms | 524288 KB | Execution killed with signal 9 |
21 | Halted | 0 ms | 0 KB | - |