5757 | 2023-09-16 22:43:10 | kristof | Zsonglőrködés | python3 | Wrong answer 0/100 | 1.59s | 50880 KiB |
n = int(input())
l = [] #Az összes párok legenerálása
for i in range(n):
temp = list(map(int, input().split()))
l.append(temp)
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)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 18ms | 10820 KiB | ||||
2 | Accepted | 17ms | 11032 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Wrong answer | 82ms | 12468 KiB | ||||
4 | Time limit exceeded | 1.572s | 17692 KiB | ||||
5 | Time limit exceeded | 1.546s | 37316 KiB | ||||
6 | Time limit exceeded | 1.574s | 44312 KiB | ||||
7 | Time limit exceeded | 1.582s | 48892 KiB | ||||
8 | Time limit exceeded | 1.574s | 49180 KiB | ||||
9 | Time limit exceeded | 1.582s | 49636 KiB | ||||
10 | Time limit exceeded | 1.56s | 49708 KiB | ||||
11 | Time limit exceeded | 1.549s | 50104 KiB | ||||
subtask3 | 0/35 | ||||||
12 | Wrong answer | 17ms | 12940 KiB | ||||
13 | Wrong answer | 17ms | 13032 KiB | ||||
14 | Wrong answer | 18ms | 13096 KiB | ||||
15 | Wrong answer | 23ms | 13468 KiB | ||||
16 | Wrong answer | 37ms | 13536 KiB | ||||
17 | Wrong answer | 35ms | 13580 KiB | ||||
18 | Wrong answer | 37ms | 13860 KiB | ||||
19 | Wrong answer | 37ms | 13876 KiB | ||||
20 | Wrong answer | 37ms | 14160 KiB | ||||
subtask4 | 0/45 | ||||||
21 | Wrong answer | 83ms | 14952 KiB | ||||
22 | Time limit exceeded | 1.567s | 19684 KiB | ||||
23 | Time limit exceeded | 1.554s | 39532 KiB | ||||
24 | Time limit exceeded | 1.585s | 46412 KiB | ||||
25 | Time limit exceeded | 1.577s | 50880 KiB | ||||
26 | Time limit exceeded | 1.58s | 50676 KiB | ||||
27 | Time limit exceeded | 1.572s | 50788 KiB | ||||
28 | Time limit exceeded | 1.557s | 50632 KiB | ||||
29 | Time limit exceeded | 1.59s | 50684 KiB |