# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782163 | 2023-07-13T15:54:07 Z | christinelynn | Strange Device (APIO19_strange_device) | C++17 | 5000 ms | 524288 KB |
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define pii pair<int,int> #define pll pair<long long, long long> long long n,a,b; set<pll> st; int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int tc,i; cin>>n>>a>>b; for(i=1;i<=n;i++) { long long l,r,x,y; cin>>l>>r; for(long long j=l;j<=r;j++) { st.insert({(j+j/b)%a,j%b}); } } cout<<(long long)st.size()<<'\n'; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 34 ms | 12336 KB | Output is correct |
3 | Correct | 57 ms | 18068 KB | Output is correct |
4 | Correct | 2 ms | 852 KB | Output is correct |
5 | Correct | 0 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
7 | Correct | 1 ms | 444 KB | Output is correct |
8 | Correct | 1 ms | 340 KB | Output is correct |
9 | Correct | 6 ms | 1108 KB | Output is correct |
10 | Correct | 1 ms | 316 KB | Output is correct |
11 | Correct | 0 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 | 34 ms | 7028 KB | Output is correct |
16 | Correct | 21 ms | 6760 KB | Output is correct |
17 | Correct | 43 ms | 6712 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 | 2516 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 | 113 ms | 32184 KB | Output is correct |
3 | Correct | 169 ms | 32096 KB | Output is correct |
4 | Correct | 113 ms | 30532 KB | Output is correct |
5 | Execution timed out | 5071 ms | 62492 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 | 402 ms | 62848 KB | Output is correct |
3 | Runtime error | 1331 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 | 402 ms | 62848 KB | Output is correct |
3 | Runtime error | 1331 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 | 402 ms | 62848 KB | Output is correct |
3 | Runtime error | 1331 ms | 524288 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Runtime error | 1353 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 | 34 ms | 12336 KB | Output is correct |
3 | Correct | 57 ms | 18068 KB | Output is correct |
4 | Correct | 2 ms | 852 KB | Output is correct |
5 | Correct | 0 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
7 | Correct | 1 ms | 444 KB | Output is correct |
8 | Correct | 1 ms | 340 KB | Output is correct |
9 | Correct | 6 ms | 1108 KB | Output is correct |
10 | Correct | 1 ms | 316 KB | Output is correct |
11 | Correct | 0 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 | 34 ms | 7028 KB | Output is correct |
16 | Correct | 21 ms | 6760 KB | Output is correct |
17 | Correct | 43 ms | 6712 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 | 2516 ms | 524288 KB | Execution killed with signal 9 |
21 | Halted | 0 ms | 0 KB | - |