Submission #76628338


Source Code Expand

N = int(input())
ans = [[] for _ in range(N)]
for i in range(N):
    X = list(map(int, input().split()))
    M = X[0]
    for j in range(M):
        ans[X[j + 1] - 1].append(i + 1)

for a in ans:
    a = [len(a)] + a
    print(*a)

Submission Info

Submission Time
Task B - Gift
User msd7
Language Python (PyPy 3.11-v7.3.20)
Score 200
Code Size 242 Byte
Status AC
Exec Time 82 ms
Memory 104192 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 14
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_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 52 ms 79512 KiB
00_sample_01.txt AC 52 ms 79584 KiB
00_sample_02.txt AC 52 ms 79428 KiB
01_random_00.txt AC 52 ms 79440 KiB
01_random_01.txt AC 82 ms 104192 KiB
01_random_02.txt AC 54 ms 80032 KiB
01_random_03.txt AC 53 ms 80444 KiB
01_random_04.txt AC 65 ms 96116 KiB
01_random_05.txt AC 64 ms 95308 KiB
01_random_06.txt AC 64 ms 95972 KiB
01_random_07.txt AC 61 ms 90460 KiB
01_random_08.txt AC 66 ms 96020 KiB
01_random_09.txt AC 60 ms 88668 KiB
01_random_10.txt AC 70 ms 102664 KiB