31742023-02-21 13:50:54PallanekPéterÁruszállítás (75 pont)python3Time limit exceeded 67/75400ms21180 KiB
n,m=[int(i) for i in input().split()]
valt=[0]*n
for i in range(m):
    a,b=[int(i) for i in input().split()]
    valt[a-1]+=1
    valt[b-1]-=1
arudb=0; ki=0
for i in range(n-1):
    arudb+=valt[i]
    if arudb==0:
        ki+=1
print(ki)
SubtaskSumTestVerdictTimeMemory
base67/75
1Accepted0/018ms11064 KiB
2Time limit exceeded0/0400ms11936 KiB
3Accepted3/317ms11288 KiB
4Accepted3/317ms11624 KiB
5Accepted3/317ms11872 KiB
6Accepted3/317ms12280 KiB
7Accepted3/317ms12296 KiB
8Accepted4/417ms12320 KiB
9Accepted4/417ms12516 KiB
10Accepted4/417ms12492 KiB
11Accepted4/434ms13668 KiB
12Accepted4/441ms14140 KiB
13Accepted4/450ms14228 KiB
14Accepted4/476ms15532 KiB
15Accepted4/471ms15724 KiB
16Accepted4/4104ms17752 KiB
17Accepted4/4123ms19288 KiB
18Accepted4/4155ms21064 KiB
19Accepted4/4118ms19484 KiB
20Accepted4/4186ms21180 KiB
21Time limit exceeded0/4347ms13876 KiB
22Time limit exceeded0/4349ms13980 KiB