# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782140 | 2023-07-13T15:35:41 Z | andecaandeci | Strange Device (APIO19_strange_device) | C++17 | 5000 ms | 405144 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n,a,b; ll l[1000005],r[1000005]; int main(){ scanf("%lld %lld %lld",&n,&a,&b); ll s=0; for (int i=1;i<=n;i++){ scanf("%lld %lld",&l[i],&r[i]); s+=(r[i]-l[i])+1; } if (s<1000005){ set<pair<ll,ll>> st; for (int i=1;i<=n;i++){ for (int j=l[i];j<=r[i];j++){ st.insert({(j+j/b)%a,j%b}); } } printf("%lld",st.size()); } // else if () }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Execution timed out | 5081 ms | 405144 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Execution timed out | 5070 ms | 60576 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 273 ms | 15836 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 273 ms | 15836 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 273 ms | 15836 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 25 ms | 1804 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Execution timed out | 5081 ms | 405144 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |