87192024-01-26 15:01:19kristofMekk Mester munkái (50 pont)pypy3Wrong answer 0/50684ms92388 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)
    rendelesek.append(asd)

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

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

for i, value in enumerate(rendelesek):
    if mekkUtolso < value[0]:
        mekkUtolso = value[1]
        mekkL.append(value[2])
        #print("apa", value, i)
    elif fiaUtolso < value[0]:
        fiaUtolso = value[1]
        fiaL.append(value[2])
        #print("fia", value, i)


print(len(mekkL), len(fiaL))
print(*mekkL)
print(*fiaL)
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/048ms76708 KiB
2Wrong answer0/0145ms92388 KiB
3Wrong answer0/150ms77692 KiB
4Wrong answer0/146ms78136 KiB
5Wrong answer0/243ms78600 KiB
6Wrong answer0/243ms78260 KiB
7Wrong answer0/243ms78460 KiB
8Wrong answer0/250ms78372 KiB
9Wrong answer0/350ms79100 KiB
10Wrong answer0/176ms88256 KiB
11Wrong answer0/182ms88320 KiB
12Wrong answer0/276ms88652 KiB
13Wrong answer0/286ms89808 KiB
14Wrong answer0/286ms90100 KiB
15Wrong answer0/285ms89740 KiB
16Wrong answer0/386ms90344 KiB
17Time limit exceeded0/2643ms48432 KiB
18Time limit exceeded0/2680ms48360 KiB
19Time limit exceeded0/4684ms48836 KiB
20Time limit exceeded0/4652ms48700 KiB
21Time limit exceeded0/4657ms48700 KiB
22Time limit exceeded0/4661ms48704 KiB
23Time limit exceeded0/4657ms48528 KiB