Submission #267094

# Submission time Handle Problem Language Result Execution time Memory
267094 2020-08-15T20:01:36 Z kimbj0709 Strange Device (APIO19_strange_device) C++14
10 / 100
5000 ms 524292 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
int32_t main(){
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int n,a,b;
    int input1,input2;
    cin >> n >> a >> b;
    set<pair<int,int> > set1;
    for(int i=0;i<n;i++){
        cin >> input1 >> input2;
        for(int j=input1;j<=input2;j++){
            set1.insert({(j+j/b)%a,j%b});
        }
    }
    cout << set1.size();
 
}
 
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 50 ms 12792 KB Output is correct
3 Correct 77 ms 18296 KB Output is correct
4 Correct 2 ms 896 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 2 ms 512 KB Output is correct
8 Correct 1 ms 384 KB Output is correct
9 Correct 8 ms 1280 KB Output is correct
10 Correct 0 ms 384 KB Output is correct
11 Correct 0 ms 384 KB Output is correct
12 Correct 0 ms 384 KB Output is correct
13 Correct 1 ms 384 KB Output is correct
14 Correct 1 ms 384 KB Output is correct
15 Correct 45 ms 7032 KB Output is correct
16 Correct 29 ms 7200 KB Output is correct
17 Correct 68 ms 10360 KB Output is correct
18 Correct 0 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Runtime error 2621 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 149 ms 32376 KB Output is correct
3 Correct 198 ms 32248 KB Output is correct
4 Correct 135 ms 30712 KB Output is correct
5 Execution timed out 5013 ms 62584 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 620 ms 76572 KB Output is correct
3 Runtime error 2133 ms 524292 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 620 ms 76572 KB Output is correct
3 Runtime error 2133 ms 524292 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 620 ms 76572 KB Output is correct
3 Runtime error 2133 ms 524292 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Runtime error 1723 ms 524292 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 50 ms 12792 KB Output is correct
3 Correct 77 ms 18296 KB Output is correct
4 Correct 2 ms 896 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 2 ms 512 KB Output is correct
8 Correct 1 ms 384 KB Output is correct
9 Correct 8 ms 1280 KB Output is correct
10 Correct 0 ms 384 KB Output is correct
11 Correct 0 ms 384 KB Output is correct
12 Correct 0 ms 384 KB Output is correct
13 Correct 1 ms 384 KB Output is correct
14 Correct 1 ms 384 KB Output is correct
15 Correct 45 ms 7032 KB Output is correct
16 Correct 29 ms 7200 KB Output is correct
17 Correct 68 ms 10360 KB Output is correct
18 Correct 0 ms 384 KB Output is correct
19 Correct 0 ms 384 KB Output is correct
20 Runtime error 2621 ms 524288 KB Execution killed with signal 9
21 Halted 0 ms 0 KB -