import sys
input = lambda: sys.stdin.readline().strip()
from math import *
n,a,b = map(int, input().split())
ranges = []
for i in range(n):
ranges.append(list(map(int, input().split())))
k = (lcm(a,b+1)//(b+1)) * b
new = []
ans = 0
flag = False
for i in ranges:
if i[1]-i[0]+1 >= k:
flag = True
if i[0]%k > i[1]%k:
new.append([i[0]%k,k-1])
new.append([0,i[1]%k])
else:
new.append([i[0]%k, i[1]%k])
new.sort()
realnew = []
print(3)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
57 ms |
20156 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
62 ms |
20140 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
67 ms |
20168 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
69 ms |
20200 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
69 ms |
20200 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
69 ms |
20200 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
57 ms |
20196 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
57 ms |
20156 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |