Submission #4282452


Source Code Expand

Copy
N, M = map(int, input().split())
KA = [ list(map(int, input().split())) for _ in range(N)]

like = [ 0 for x in range(M+1)]
for ka in KA:
    a = ka[1:]
    for aa in a:
        like[aa] += 1

#print(like)
cnt = 0
for l in like:
    if l == N:
        cnt += 1
print(cnt)

Submission Info

Submission Time
Task B - Foods Loved by Everyone
User showyou41
Language Python3 (3.4.3)
Score 200
Code Size 285 Byte
Status
Exec Time 18 ms
Memory 3060 KB

Test Cases

Set Name Score / Max Score Test Cases
All 200 / 200 0_random_1, 0_random_2, 1_max_1, 1_max_2, 2_nmin_1, 3_mmin_1, 4_corner_1, 4_corner_2, 4_corner_3, 5_hand_1, 5_hand_2, 5_hand_3, sample_01, sample_02, sample_03
Sample 0 / 0 sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
0_random_1 17 ms 3060 KB
0_random_2 17 ms 3060 KB
1_max_1 17 ms 3060 KB
1_max_2 17 ms 3060 KB
2_nmin_1 17 ms 3060 KB
3_mmin_1 17 ms 3060 KB
4_corner_1 17 ms 2940 KB
4_corner_2 18 ms 3060 KB
4_corner_3 17 ms 2936 KB
5_hand_1 17 ms 3060 KB
5_hand_2 17 ms 2940 KB
5_hand_3 17 ms 2940 KB
sample_01 17 ms 3060 KB
sample_02 17 ms 3060 KB
sample_03 17 ms 3060 KB