Submission #76634442


Source Code Expand

n = int(input())

ans = [[] for _ in range(n)] 
for i in range(n):
    lst = list(map(int, input().split()))
    k = lst[0]
    a = lst[1:]

    for j in a:
        ans[j - 1].append(i + 1)

for i in range(n):
    print(len(ans[i]), *ans[i])

Submission Info

Submission Time
Task B - Gift
User gett
Language Python (PyPy 3.11-v7.3.20)
Score 200
Code Size 253 Byte
Status AC
Exec Time 68 ms
Memory 104472 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 50 ms 79264 KiB
00_sample_01.txt AC 50 ms 79688 KiB
00_sample_02.txt AC 50 ms 79448 KiB
01_random_00.txt AC 49 ms 79504 KiB
01_random_01.txt AC 68 ms 104472 KiB
01_random_02.txt AC 51 ms 80248 KiB
01_random_03.txt AC 51 ms 80488 KiB
01_random_04.txt AC 62 ms 96140 KiB
01_random_05.txt AC 61 ms 95300 KiB
01_random_06.txt AC 62 ms 96016 KiB
01_random_07.txt AC 58 ms 90612 KiB
01_random_08.txt AC 62 ms 96172 KiB
01_random_09.txt AC 56 ms 88788 KiB
01_random_10.txt AC 67 ms 102980 KiB