Submission #53592285


Source Code Expand

N = int(input())
li = [list(map(int,input().split()))+[i+1] for i in range(N)]

import operator
li = sorted(li,key=operator.itemgetter(1))

maximum = 0
ans = []
for a,c,i in li:
    if a >= maximum:
        ans.append(i)
    maximum = max(maximum,a)

ans.sort()
print(len(ans))
print(*ans)

Submission Info

Submission Time
Task C - AtCoder Magics
User TsubakiMint
Language Python (PyPy 3.10-v7.3.12)
Score 350
Code Size 304 Byte
Status AC
Exec Time 282 ms
Memory 129796 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 350 / 350
Status
AC × 3
AC × 17
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_hand_00.txt, 01_hand_01.txt, 01_hand_02.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt, 02_random_10.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 56 ms 76524 KiB
00_sample_01.txt AC 57 ms 76628 KiB
00_sample_02.txt AC 57 ms 76364 KiB
01_hand_00.txt AC 175 ms 107812 KiB
01_hand_01.txt AC 200 ms 129796 KiB
01_hand_02.txt AC 202 ms 121108 KiB
02_random_00.txt AC 192 ms 109824 KiB
02_random_01.txt AC 213 ms 109928 KiB
02_random_02.txt AC 185 ms 109604 KiB
02_random_03.txt AC 213 ms 110320 KiB
02_random_04.txt AC 200 ms 109896 KiB
02_random_05.txt AC 189 ms 109832 KiB
02_random_06.txt AC 277 ms 110164 KiB
02_random_07.txt AC 282 ms 109944 KiB
02_random_08.txt AC 282 ms 109884 KiB
02_random_09.txt AC 280 ms 109816 KiB
02_random_10.txt AC 281 ms 110004 KiB