87212024-01-26 15:02:40kristofMekk Mester munkái (50 pont)pypy3Wrong answer 7/50689ms92484 KiB
megrendelesekSzama, napokSzama = (int(i) for i in input().split()) 
rendelesek = []

for i in range(megrendelesekSzama):
    asd = list(map(int, input().split()))
    asd.append(i+1)
    rendelesek.append(asd)

rendelesek.sort()
rendelesek.sort(key=lambda x: x[1])

mekkUtolso = 0
fiaUtolso = 0
mekkL = []
fiaL = []

for value in rendelesek:
    if mekkUtolso < value[0]:
        mekkUtolso = value[1]
        mekkL.append(value[2])
    elif fiaUtolso < value[0]:
        fiaUtolso = value[1]
        fiaL.append(value[2])


print(len(mekkL), len(fiaL))
print(*mekkL)
print(*fiaL)
SubtaskSumTestVerdictTimeMemory
base7/50
1Accepted0/048ms76940 KiB
2Wrong answer0/0160ms92484 KiB
3Accepted1/150ms78668 KiB
4Accepted1/150ms78600 KiB
5Wrong answer0/250ms78652 KiB
6Wrong answer0/250ms78712 KiB
7Accepted2/250ms78648 KiB
8Wrong answer0/246ms79376 KiB
9Accepted3/350ms79600 KiB
10Wrong answer0/193ms88612 KiB
11Wrong answer0/176ms88740 KiB
12Wrong answer0/293ms88800 KiB
13Wrong answer0/285ms89544 KiB
14Wrong answer0/297ms89760 KiB
15Wrong answer0/281ms89872 KiB
16Wrong answer0/385ms90028 KiB
17Time limit exceeded0/2666ms48448 KiB
18Time limit exceeded0/2680ms48432 KiB
19Time limit exceeded0/4685ms48780 KiB
20Time limit exceeded0/4689ms48888 KiB
21Time limit exceeded0/4675ms48812 KiB
22Time limit exceeded0/4672ms48716 KiB
23Time limit exceeded0/4676ms48808 KiB