20082022-12-13 22:00:02neszbalÁruszállítás üres szakaszaipython3Runtime error 0/50186ms28984 KiB
n, m = map(int, input().split())
c = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    c[a - 1] += 1
    c[b] -= 1
d = 0
res = 0
for i in range(n):
    d += c[i]
    if d == 0:
        res += 1
print(res)
SubtaskSumTestVerdictTimeMemory
base0/50
1Accepted0/017ms10968 KiB
2Runtime error0/061ms26864 KiB
3Wrong answer0/216ms11016 KiB
4Runtime error0/217ms11404 KiB
5Wrong answer0/216ms11644 KiB
6Wrong answer0/217ms11340 KiB
7Wrong answer0/217ms11740 KiB
8Wrong answer0/217ms11752 KiB
9Runtime error0/217ms11976 KiB
10Runtime error0/217ms12068 KiB
11Wrong answer0/234ms12952 KiB
12Wrong answer0/243ms13700 KiB
13Runtime error0/317ms13708 KiB
14Runtime error0/321ms15368 KiB
15Runtime error0/321ms15452 KiB
16Runtime error0/3174ms27996 KiB
17Runtime error0/3185ms28160 KiB
18Runtime error0/3186ms28360 KiB
19Runtime error0/321ms19096 KiB
20Runtime error0/325ms20692 KiB
21Runtime error0/356ms28824 KiB
22Runtime error0/339ms28984 KiB