# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
404906 | 2021-05-15T09:31:17 Z | A_D | Strange Device (APIO19_strange_device) | C++14 | 5000 ms | 524292 KB |
#include <bits/stdc++.h> #define int long long #define ii pair<int,int> #define F first #define S second #define du long double using namespace std; set<ii> st; void solve() { int n,a,b; cin>>n>>a>>b; while(n--){ int l,r; scanf("%lld",&l); scanf("%lld",&r); for(int i=l;i<=r;i++){ int x=(i+(i/b))%a; int y=i%b; st.insert({x,y}); } } cout<<st.size()<<endl; } main() { int t=1; //cin>>t; while(t--)solve(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 65 ms | 12260 KB | Output is correct |
3 | Correct | 71 ms | 17812 KB | Output is correct |
4 | Correct | 2 ms | 844 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 332 KB | Output is correct |
7 | Correct | 2 ms | 460 KB | Output is correct |
8 | Correct | 1 ms | 332 KB | Output is correct |
9 | Correct | 8 ms | 1100 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |
11 | Correct | 1 ms | 204 KB | Output is correct |
12 | Correct | 1 ms | 204 KB | Output is correct |
13 | Correct | 1 ms | 204 KB | Output is correct |
14 | Correct | 1 ms | 204 KB | Output is correct |
15 | Correct | 44 ms | 6936 KB | Output is correct |
16 | Correct | 31 ms | 6660 KB | Output is correct |
17 | Correct | 73 ms | 6536 KB | Output is correct |
18 | Correct | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Runtime error | 3928 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 | Correct | 137 ms | 32224 KB | Output is correct |
3 | Correct | 187 ms | 31948 KB | Output is correct |
4 | Correct | 128 ms | 30432 KB | Output is correct |
5 | Execution timed out | 5068 ms | 62548 KB | Time limit exceeded |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 639 ms | 62768 KB | Output is correct |
3 | Runtime error | 2144 ms | 524292 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 639 ms | 62768 KB | Output is correct |
3 | Runtime error | 2144 ms | 524292 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 639 ms | 62768 KB | Output is correct |
3 | Runtime error | 2144 ms | 524292 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Runtime error | 1599 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 | Correct | 65 ms | 12260 KB | Output is correct |
3 | Correct | 71 ms | 17812 KB | Output is correct |
4 | Correct | 2 ms | 844 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 332 KB | Output is correct |
7 | Correct | 2 ms | 460 KB | Output is correct |
8 | Correct | 1 ms | 332 KB | Output is correct |
9 | Correct | 8 ms | 1100 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |
11 | Correct | 1 ms | 204 KB | Output is correct |
12 | Correct | 1 ms | 204 KB | Output is correct |
13 | Correct | 1 ms | 204 KB | Output is correct |
14 | Correct | 1 ms | 204 KB | Output is correct |
15 | Correct | 44 ms | 6936 KB | Output is correct |
16 | Correct | 31 ms | 6660 KB | Output is correct |
17 | Correct | 73 ms | 6536 KB | Output is correct |
18 | Correct | 1 ms | 204 KB | Output is correct |
19 | Correct | 1 ms | 204 KB | Output is correct |
20 | Runtime error | 3928 ms | 524292 KB | Execution killed with signal 9 |
21 | Halted | 0 ms | 0 KB | - |