87232024-01-26 15:15:56kristofMekk Mester munkái (50 pont)pypy3Wrong answer 7/50652ms147240 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(key=lambda x: (x[1], x[0]))

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

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


print(len(mekkL), len(fiaL))
print(*mekkL)
print(*fiaL)
SubtaskSumTestVerdictTimeMemory
base7/50
1Accepted0/041ms76588 KiB
2Wrong answer0/0128ms92992 KiB
3Accepted1/143ms78196 KiB
4Accepted1/143ms78700 KiB
5Wrong answer0/250ms78484 KiB
6Wrong answer0/250ms79280 KiB
7Accepted2/250ms79516 KiB
8Wrong answer0/246ms79520 KiB
9Accepted3/343ms80008 KiB
10Wrong answer0/172ms89136 KiB
11Wrong answer0/192ms89236 KiB
12Wrong answer0/282ms89212 KiB
13Wrong answer0/287ms90264 KiB
14Wrong answer0/279ms90272 KiB
15Wrong answer0/278ms90360 KiB
16Wrong answer0/375ms90560 KiB
17Wrong answer0/2587ms137844 KiB
18Wrong answer0/2583ms137556 KiB
19Time limit exceeded0/4606ms137780 KiB
20Wrong answer0/4584ms137672 KiB
21Wrong answer0/4588ms138000 KiB
22Wrong answer0/4593ms139224 KiB
23Time limit exceeded0/4652ms147240 KiB