87222024-01-26 15:04:46kristofMekk Mester munkái (50 pont)pypy3Wrong answer 7/50620ms146604 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])
    elif fiaUtolso < value[0]:
        fiaUtolso = value[1]
        fiaL.append(value[2])


print(len(mekkL), len(fiaL))
print(*mekkL)
print(*fiaL)
SubtaskSumTestVerdictTimeMemory
base7/50
1Accepted0/043ms76384 KiB
2Wrong answer0/0128ms93656 KiB
3Accepted1/143ms78184 KiB
4Accepted1/143ms78380 KiB
5Wrong answer0/243ms78760 KiB
6Wrong answer0/243ms79376 KiB
7Accepted2/243ms79080 KiB
8Wrong answer0/243ms78856 KiB
9Accepted3/343ms78888 KiB
10Wrong answer0/171ms88208 KiB
11Wrong answer0/171ms88196 KiB
12Wrong answer0/281ms88344 KiB
13Wrong answer0/285ms89220 KiB
14Wrong answer0/285ms89244 KiB
15Wrong answer0/285ms89304 KiB
16Wrong answer0/385ms89716 KiB
17Wrong answer0/2592ms136580 KiB
18Time limit exceeded0/2615ms136796 KiB
19Time limit exceeded0/4620ms136764 KiB
20Wrong answer0/4587ms137032 KiB
21Time limit exceeded0/4619ms137408 KiB
22Time limit exceeded0/4606ms138536 KiB
23Time limit exceeded0/4614ms146604 KiB