Submission #976762

# Submission time Handle Problem Language Result Execution time Memory
976762 2024-05-07T05:31:16 Z AIF_is_carving Strange Device (APIO19_strange_device) C++14
0 / 100
5000 ms 524288 KB
#include<bits/stdc++.h>
 
typedef long long ll;
using namespace std;



int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    set<pair<ll, ll>> s;
    ll n, A, B; cin>>n>>A>>B;
    for(int i=0; i<n; i++){
        ll x, y; cin>>x>>y;
        for(int t = x; t<=y; t++){
            ll p = (t+(t/B))%A;
            ll q = t%B;

            s.insert({p, q});
        }
    }

    cout<<s.size()<<"\n";

    return 0;
}
 
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Execution timed out 5101 ms 405248 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 2337 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Execution timed out 5054 ms 60548 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Execution timed out 5021 ms 77648 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Execution timed out 5021 ms 77648 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Execution timed out 5021 ms 77648 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 1157 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Execution timed out 5101 ms 405248 KB Time limit exceeded
3 Halted 0 ms 0 KB -