#include <iostream>
#include <set>
using namespace std;
set <pair<long long,long long> > s;
long long n,i,j,l,r,A,B;
int main()
{
cin>>n>>A>>B;
for(i=1;i<=n;i++)
{
cin>>l>>r;
for(j=l;j<=r;j++)
s.insert({(j/B)%A,j%B});
}
cout<<s.size();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
86 ms |
12660 KB |
Output is correct |
3 |
Correct |
124 ms |
18372 KB |
Output is correct |
4 |
Incorrect |
5 ms |
1016 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Runtime error |
4454 ms |
524292 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
164 ms |
32424 KB |
Output is correct |
3 |
Correct |
157 ms |
32124 KB |
Output is correct |
4 |
Correct |
156 ms |
30652 KB |
Output is correct |
5 |
Execution timed out |
5068 ms |
62516 KB |
Time limit exceeded |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2901 ms |
64012 KB |
Output is correct |
3 |
Runtime error |
2923 ms |
524292 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2901 ms |
64012 KB |
Output is correct |
3 |
Runtime error |
2923 ms |
524292 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2901 ms |
64012 KB |
Output is correct |
3 |
Runtime error |
2923 ms |
524292 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Runtime error |
2744 ms |
524292 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
86 ms |
12660 KB |
Output is correct |
3 |
Correct |
124 ms |
18372 KB |
Output is correct |
4 |
Incorrect |
5 ms |
1016 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |