35602023-02-28 23:55:27herczegkatÁruszállítás (75 pont)python3Time limit exceeded 55/75368ms20864 KiB
aDB,vDB=[int(i) for i in input().split()]
szakasz=[0]*(aDB-1)
for i in range(vDB):
    k,v=[int(i) for i in input().split()]
    for j in range (k-1, v-1):
        szakasz[j]=1
van=0
for i in range(aDB-1):
        van+=szakasz[i]
print(aDB-1-van)
SubtaskSumTestVerdictTimeMemory
base55/75
1Accepted0/017ms11376 KiB
2Time limit exceeded0/0368ms12092 KiB
3Accepted3/317ms12024 KiB
4Accepted3/317ms11772 KiB
5Accepted3/317ms12228 KiB
6Accepted3/317ms12188 KiB
7Accepted3/317ms12508 KiB
8Accepted4/417ms12552 KiB
9Accepted4/417ms12516 KiB
10Accepted4/417ms12516 KiB
11Accepted4/427ms13600 KiB
12Accepted4/435ms14044 KiB
13Accepted4/463ms14132 KiB
14Accepted4/482ms15880 KiB
15Accepted4/472ms15544 KiB
16Time limit exceeded0/4342ms7884 KiB
17Time limit exceeded0/4356ms8660 KiB
18Time limit exceeded0/4349ms9320 KiB
19Accepted4/4218ms18848 KiB
20Accepted4/4210ms20864 KiB
21Time limit exceeded0/4356ms13644 KiB
22Time limit exceeded0/4361ms13556 KiB