Submission #884367

# Submission time Handle Problem Language Result Execution time Memory
884367 2023-12-07T08:52:03 Z ezzzay Strange Device (APIO19_strange_device) C++14
10 / 100
5000 ms 524288 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
   int n,a,b;
   cin>>n>>a>>b;
   set<pair<int,int>>st;
   for(int i=1;i<=n;i++){
       int l,r;
       cin>>l>>r;
       for(int x=l;x<=r;x++){
            st.insert(make_pair((x+x/b)%a, x%b));
       }
   }
   cout<<st.size();
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 41 ms 12452 KB Output is correct
3 Correct 59 ms 18036 KB Output is correct
4 Correct 2 ms 860 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 604 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 7 ms 1116 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 31 ms 7004 KB Output is correct
16 Correct 29 ms 6748 KB Output is correct
17 Correct 114 ms 6708 KB Output is correct
18 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 1915 ms 524288 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 119 ms 32364 KB Output is correct
3 Correct 156 ms 32080 KB Output is correct
4 Correct 97 ms 30588 KB Output is correct
5 Execution timed out 5019 ms 62604 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1101 ms 63032 KB Output is correct
3 Runtime error 1262 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1101 ms 63032 KB Output is correct
3 Runtime error 1262 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1101 ms 63032 KB Output is correct
3 Runtime error 1262 ms 524288 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 1261 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 Correct 41 ms 12452 KB Output is correct
3 Correct 59 ms 18036 KB Output is correct
4 Correct 2 ms 860 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 604 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 7 ms 1116 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 31 ms 7004 KB Output is correct
16 Correct 29 ms 6748 KB Output is correct
17 Correct 114 ms 6708 KB Output is correct
18 Correct 1 ms 344 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Runtime error 1915 ms 524288 KB Execution killed with signal 9
21 Halted 0 ms 0 KB -