57562023-09-16 22:41:46kristofZsonglőrködéspython3Wrong answer 0/1001.588s95412 KiB
n = int(input())
l = [[0, 0] for i in range(n)] #Az összes párok legenerálása

for i in range(n):
    temp = list(map(int, input().split()))
    
    l[i][0] = temp[0]
    l[i][1] = temp[1]


l = sorted(l, key=lambda x: x[1])


o = 0

while len(l) != 0:
    o += 1
    veg = l[0][0]
    del l[0]

    for i in l:
        if i[0] >= veg:
            veg = i[1]
            l.remove(i)
print(o)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms10964 KiB
2Accepted17ms11380 KiB
subtask20/20
3Wrong answer79ms12656 KiB
4Time limit exceeded1.578s16192 KiB
5Time limit exceeded1.541s35068 KiB
6Time limit exceeded1.557s43572 KiB
7Time limit exceeded1.578s51056 KiB
8Time limit exceeded1.577s55276 KiB
9Time limit exceeded1.572s59448 KiB
10Time limit exceeded1.588s63452 KiB
11Time limit exceeded1.56s67960 KiB
subtask30/35
12Wrong answer17ms40216 KiB
13Wrong answer17ms40344 KiB
14Wrong answer18ms40536 KiB
15Wrong answer23ms40572 KiB
16Wrong answer37ms41004 KiB
17Wrong answer37ms41312 KiB
18Wrong answer37ms41464 KiB
19Wrong answer37ms41676 KiB
20Wrong answer37ms41708 KiB
subtask40/45
21Wrong answer86ms42172 KiB
22Time limit exceeded1.559s45548 KiB
23Time limit exceeded1.572s64016 KiB
24Time limit exceeded1.557s72740 KiB
25Time limit exceeded1.557s80184 KiB
26Time limit exceeded1.562s83840 KiB
27Time limit exceeded1.582s87692 KiB
28Time limit exceeded1.569s91728 KiB
29Time limit exceeded1.565s95412 KiB