Submission #722305

# Submission time Handle Problem Language Result Execution time Memory
722305 2023-04-11T17:58:24 Z Toxtaq Strange Device (APIO19_strange_device) C++17
0 / 100
5000 ms 524288 KB
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long a, b;
    int n;
    cin >> n >> a >> b;
    set<pair<long long, long long>>pairs;
    for(int i = 0;i < n;++i){
        long long l, r;
        cin >> l >> r;
        for(int t = l;t <= r;++t){
            long long x = (t + t / b)% a, y = t % b;
            pairs.insert({x, y});
        }
    }
    cout << pairs.size();
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 300 KB Output is correct
2 Execution timed out 5064 ms 405096 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 Runtime error 2819 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Execution timed out 5053 ms 60620 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Execution timed out 5052 ms 77524 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Execution timed out 5052 ms 77524 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Execution timed out 5052 ms 77524 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 Runtime error 1241 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 300 KB Output is correct
2 Execution timed out 5064 ms 405096 KB Time limit exceeded
3 Halted 0 ms 0 KB -