87202024-01-26 15:01:53kristofMekk Mester munkái (50 pont)pypy3Wrong answer 7/50680ms92620 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 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
base7/50
1Accepted0/043ms76628 KiB
2Wrong answer0/0137ms92620 KiB
3Accepted1/143ms78176 KiB
4Accepted1/154ms78580 KiB
5Wrong answer0/250ms78584 KiB
6Wrong answer0/252ms78168 KiB
7Accepted2/246ms78984 KiB
8Wrong answer0/252ms79492 KiB
9Accepted3/350ms79692 KiB
10Wrong answer0/176ms88348 KiB
11Wrong answer0/172ms88248 KiB
12Wrong answer0/274ms88516 KiB
13Wrong answer0/285ms89684 KiB
14Wrong answer0/281ms89832 KiB
15Wrong answer0/285ms89668 KiB
16Wrong answer0/385ms90072 KiB
17Time limit exceeded0/2674ms48328 KiB
18Time limit exceeded0/2665ms48240 KiB
19Time limit exceeded0/4676ms48196 KiB
20Time limit exceeded0/4676ms48548 KiB
21Time limit exceeded0/4672ms48504 KiB
22Time limit exceeded0/4680ms48996 KiB
23Time limit exceeded0/4647ms48856 KiB