Submission #1100545

# Submission time Handle Problem Language Result Execution time Memory
1100545 2024-10-14T08:37:59 Z vjudge1 Strange Device (APIO19_strange_device) C++17
0 / 100
1888 ms 524288 KB
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
    ll n, a, b;
    cin >>n >>a >> b;
    
    set<pair<ll, ll>> u;
    for (int i = 0; i < n; i++) {
        ll l, r;
        cin >>l>>r;
        for (ll t =l; t <= r; t++) {
            ll x = (t/a)%b;
            ll y = t%b;
            u.insert({x, y});
        }
    }
    cout << u.size() << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 37 ms 12768 KB Output is correct
3 Correct 54 ms 18252 KB Output is correct
4 Incorrect 2 ms 1108 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Runtime error 1888 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Incorrect 17 ms 712 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Incorrect 846 ms 37452 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Incorrect 846 ms 37452 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Incorrect 846 ms 37452 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Runtime error 1520 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 37 ms 12768 KB Output is correct
3 Correct 54 ms 18252 KB Output is correct
4 Incorrect 2 ms 1108 KB Output isn't correct
5 Halted 0 ms 0 KB -