Submission #1004962

# Submission time Handle Problem Language Result Execution time Memory
1004962 2024-06-22T05:08:30 Z vjudge1 Strange Device (APIO19_strange_device) C++17
0 / 100
1966 ms 524288 KB
#include <bits/stdc++.h>
using namespace std;

int n, a, b;

int main(){
    cin >> n >> a >> b;
    vector<pair<int,int>> vec;
    set<pair<int, int>> st;
    for (int i = 0; i < n; i ++){
        int l, r; 
        cin >> l >> r;
        vec.push_back({l, r});

        for (int t = l; t <= r; t ++)
            st.insert({(t + (t / b)) % a, t % b});
    }

    cout << st.size() << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 604 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Runtime error 1966 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 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 15 ms 9672 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 15 ms 9672 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 15 ms 9672 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 2 ms 1492 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 604 KB Output isn't correct
3 Halted 0 ms 0 KB -