88532024-02-02 14:30:18petergalambosMekk Mester munkái (50 pont)python3Wrong answer 7/50513ms55624 KiB
N, H = [int(i) for i in input().split()]
M = [[] for i in range(N)]
K1 = []
K2 = []
for i in range(N):
    k,v = [int(i) for i in input().split()]
    M[i] = [v,k,i+1]

M.sort()

K2 = [M[0]]
R1 = 0
R2 = M[0][0]

for m in M[1:]:
    if m[1] > R1:
        K1.append(m)
        R1 = m[0]
    elif m[1] > R2:
        K2.append(m)
        R2 = m[0]

print(len(K1),len(K2))
print(*[i[-1] for i in K1])
print(*[i[-1] for i in K2])
SubtaskSumTestVerdictTimeMemory
base7/50
1Accepted0/017ms11128 KiB
2Wrong answer0/052ms15536 KiB
3Accepted1/117ms11696 KiB
4Accepted1/117ms11868 KiB
5Wrong answer0/217ms12100 KiB
6Wrong answer0/217ms11904 KiB
7Accepted2/217ms12016 KiB
8Wrong answer0/217ms12052 KiB
9Accepted3/317ms11796 KiB
10Wrong answer0/120ms12748 KiB
11Wrong answer0/119ms12780 KiB
12Wrong answer0/220ms12756 KiB
13Wrong answer0/220ms12740 KiB
14Wrong answer0/220ms12740 KiB
15Wrong answer0/220ms12940 KiB
16Wrong answer0/321ms13092 KiB
17Wrong answer0/2460ms53328 KiB
18Wrong answer0/2453ms53544 KiB
19Wrong answer0/4463ms53700 KiB
20Wrong answer0/4513ms53876 KiB
21Wrong answer0/4497ms54088 KiB
22Wrong answer0/4512ms54392 KiB
23Wrong answer0/4501ms55624 KiB