# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432622 | 2021-06-18T11:40:43 Z | inwbear | Strange Device (APIO19_strange_device) | C++14 | 5000 ms | 524292 KB |
#include <bits/stdc++.h> using namespace std; long long a,b,n,l,r,c1,c2,ans; map<pair<long long,long long>,bool >mp; int main() { scanf("%lld %lld %lld",&n,&a,&b); for(int i=1;i<=n;i++) { scanf("%d %d",&l,&r); for(int ii=l;ii<=r;ii++) { c1=(ii+(ii/b))%a; c2=ii%b; if(!mp[{c1,c2}])mp[{c1,c2}]=true,ans++; } } printf("%lld",ans); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 288 KB | Output is correct |
2 | Execution timed out | 5079 ms | 405080 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Runtime error | 4583 ms | 524292 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Execution timed out | 5094 ms | 60484 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Execution timed out | 5097 ms | 77608 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Execution timed out | 5097 ms | 77608 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Execution timed out | 5097 ms | 77608 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Runtime error | 2796 ms | 524292 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 288 KB | Output is correct |
2 | Execution timed out | 5079 ms | 405080 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |