88582024-02-02 15:05:55kristofMekk Mester munkái (50 pont)python3Wrong answer 7/50536ms75156 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(str(value[2]))
        continue
    if fiaUtolso < value[0]:
        fiaUtolso = value[1]
        fiaL.append(str(value[2]))


print(len(mekkL), len(fiaL))
print(" ".join(mekkL))
print(" ".join(fiaL))
SubtaskSumTestVerdictTimeMemory
base7/50
1Accepted0/017ms11248 KiB
2Wrong answer0/054ms17808 KiB
3Accepted1/118ms11968 KiB
4Accepted1/117ms12080 KiB
5Wrong answer0/217ms12188 KiB
6Wrong answer0/217ms12768 KiB
7Accepted2/218ms12732 KiB
8Wrong answer0/217ms12696 KiB
9Accepted3/318ms13032 KiB
10Wrong answer0/121ms13488 KiB
11Wrong answer0/121ms13812 KiB
12Wrong answer0/221ms13804 KiB
13Wrong answer0/220ms13848 KiB
14Wrong answer0/220ms13512 KiB
15Wrong answer0/220ms13860 KiB
16Wrong answer0/323ms14228 KiB
17Wrong answer0/2462ms74488 KiB
18Wrong answer0/2456ms74944 KiB
19Wrong answer0/4451ms74904 KiB
20Wrong answer0/4458ms74688 KiB
21Wrong answer0/4536ms75156 KiB
22Wrong answer0/4460ms75132 KiB
23Wrong answer0/4490ms75000 KiB