problem_id stringlengths 6 6 | user_id stringlengths 10 10 | time_limit float64 1k 8k | memory_limit float64 262k 1.05M | problem_description stringlengths 48 1.55k | codes stringlengths 35 98.9k | status stringlengths 28 1.7k | submission_ids stringlengths 28 1.41k | memories stringlengths 13 808 | cpu_times stringlengths 11 610 | code_sizes stringlengths 7 505 |
|---|---|---|---|---|---|---|---|---|---|---|
p03126 | u519003353 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n = int(input())\nm = int(input())\na = [list(map(int, input().split())) for i in range(0,n)]\nresult = [0 for i in range(m)]\n\nfor mindex in range(0,m):\n for nindex in range(0,n):\n for kindex in range(1,a[nindex][0]+1):\n if a[nindex][kindex] == mindex+1:\n result[mindex]+=1\n else:\n pass\n \n\nprint(result.count(n+1))', 'n, m = map(int, input().split())\na = [list(map(int, input().split())) for i in range(n)]\nresult = [0 for i in range(m)]\nfor mindex in range(0,m):\n for nindex in range(0,n):\n for kindex in range(1,a[nindex][0]+1):\n if a[nindex][kindex] == mindex+1:\n result[mindex]+=1\n else:\n pass\n \n\nprint(result.count(n+1))', 'n, m = map(int, input().split())\na = [list(map(int, input().split())) for i in range(n)]\nresult = [0 for i in range(m)]\nfor mindex in range(0,m):\n for nindex in range(0,n):\n for kindex in range(1,a[nindex][0]+1):\n if a[nindex][kindex] == mindex+1:\n result[mindex]+=1\n else:\n pass\n \n \nprint(result.count(n))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s359489004', 's873465424', 's638661414'] | [3064.0, 3064.0, 3064.0] | [17.0, 21.0, 21.0] | [388, 384, 383] |
p03126 | u519923151 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m = map(int, input().split())\n\nab = [list(map(int, input().split())) for _ in range(n)]\n\ndp = [0]*m\n\nfor i in range(n):\n for j in range(ab[i][0]):\n k = ab[i][j+1]\n dp[k-1] +=1\n \n\nprint(dp.count(m))', 'n,m = map(int, input().split())\n\nab = [list(map(int, input().split())) for _ in range(n)]\n\ndp = [0]*m\n\nfor i in range(n):\n for j in range(ab[i][0]):\n k = ab[i][j+1]\n dp[k-1] +=1\n \nprint(dp.count(n))'] | ['Wrong Answer', 'Accepted'] | ['s643439818', 's057862253'] | [9188.0, 9164.0] | [29.0, 27.0] | [223, 222] |
p03126 | u519939795 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\ncheck = [0 for i in range(m)]\n\nfor _ in range(n):\n A = list(map(int, input().split()))\n for a in A[1:]:\n check[a-1] += 1\n print(check)\n\nans = sum([c == n for c in check])\nprint(ans)', 'N, M = map(int, input().split())\nlikes = [0 for i in range(M)]\nK = [input().split() for i in range(N)]\n\nfor k in K:\n for like in k[1:]:\n likes[int(like)-1] += 1\n\nprint(likes.count(N))\n'] | ['Wrong Answer', 'Accepted'] | ['s181124391', 's479615574'] | [3060.0, 3060.0] | [21.0, 18.0] | [230, 194] |
p03126 | u527261492 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n y = int(x[0])\n z = x[1:y+1]\n w = list(map(int(z)))\n w.append(a)\nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if l in a[j] and l in a[j+1]:\n l.append(b)\n else:\n b = b\ncnt=0\nfor k in range(1:M+1):\n n = b.count(k)\n if n==N-1:\n cnt +=1\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n y = int(x[0])\n z = x[1:y+1]\n w = list(map(int,z))\n w.append(a)\nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if l in a[j] and l in a[j+1]:\n l.append(b)\n else:\n b = b\ncnt=0\nfor k in range(1:M+1):\n n = b.count(k)\n if n==N-1:\n cnt +=1\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n y = int(x[0])\n z = x[1:y+1]\n w = list(map(int,z))\n a.append(w)\nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if l in a[j] and l in a[j+1]:\n b.append(l)\n else:\n b = b\ncnt=0\nfor k in range(1:M+1):\n n = b.count(k)\n if n==N-1:\n cnt +=1\n else:\n cnt = cnt\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n y = int(x[0])\n z = x[1:y+1]\n w = list(map(int,z))\n a.append(w)\nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if l in a[j] and l in a[j+1]:\n b.append(l)\n else:\n b = b\ncnt=0\nfor k in range(1:M+1):\n n = b.count(k)\n if n==N-1:\n cnt +=1\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n y = int(x[0])\n z = x[1:y]\n w = list(map(int(z)))\n w.append(a)\nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if l in a[j] and l in a[j+1]:\n l.append(b)\n else:\n b = b\ncnt=0\nk=1\nfor k in range(M+1):\n n = b.count(k)\n if n==M:\n cnt +=1\nprint(cnt)\n \n \n \n \n \n ', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n z = x[1:]\n w = list(map(int,z))\n a.append(w)\nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if ((l in a[j]) and (l in a[j+1])):\n b.append(l)\ncnt=0\nfor k in range(1:M+1):\n n = b.count(k)\n if n==N-1:\n cnt +=1\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n z = x[1:]\n a += list(map(int,z))\ncnt=0\nfor k in range(1:M+1):\n n = a.count(k)\n if n==N:\n cnt +=1\n else:\n cnt = cnt\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n y = int(x[0])\n z = x[1:y+1]\n w = list(map(int,z))\n a.append(w)\n \nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if ((l in a[j]) and (l in a[j+1])):\n b.append(l)\n else:\n b = b\n\ncnt=0\nfor k in range(1:M+1):\n n = b.count(k)\n if n==N-1:\n cnt +=1\n else:\n cnt = cnt\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n y = int(x[0])\n z = x[1:y+1]\n w = list(map(int,z))\n a.append(w)\nb = []\nfor l in range(1:M+1):\n for j in range(N-1):\n if ((l in a[j]) and (l in a[j+1])):\n b.append(l)\n else:\n b = b\ncnt=0\nfor k in range(1:M+1):\n n = b.count(k)\n if n==N-1:\n cnt +=1\n else:\n cnt = cnt\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n z = x[1:]\n a += list(map(int,z))\ncnt=0\nfor k in range(1:M+1):\n n = a.count(k)\n if n==N:\n cnt +=1\nprint(cnt)\n \n \n \n \n \n \n', 'N,M = map(int,input().split())\na=[]\nfor i in range(N):\n x = input().split()\n z = x[1:]\n a += list(map(int,z))\ncnt=0\nfor k in range(1,M+1):\n n = a.count(k)\n if n==N:\n cnt +=1\n else:\n cnt = cnt\nprint(cnt)\n \n \n \n \n \n \n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s024241297', 's048919210', 's371920112', 's492336541', 's498404920', 's499138212', 's622521918', 's646625283', 's748823715', 's817842456', 's065178419'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [386, 385, 407, 385, 383, 350, 246, 417, 413, 224, 246] |
p03126 | u529108767 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import numpy as np\nN, M = input().split()\nhito = []\nfor i in range(int(N)):\n hito.append(input().split())\n\nfor i in range(int(N)):\n hito[i] = list(map(int, hito[i]))\n\nhikaku = np.arange(1,int(M)+1)\nfor i in range(int(N)):\n hikaku = list(set(hikaku) & set(hito[i]))\n \nprint(len(hikaku))\n', 'import numpy as np\nN, M = input().split()\nhito = []\nfor i in range(int(N)):\n hito.append(input().split())\n\nfor i in range(int(N)):\n hito[i] = list(map(int, hito[i]))\n\nfor i in range(int(N)):\n hito[i].pop(0)\n\nhikaku = np.arange(1,int(M)+1)\nfor i in range(int(N)):\n hikaku = list(set(hikaku) & set(hito[i]))\n print(hikaku)\n\nprint(hikaku)\nprint(len(hikaku))\n', 'import numpy as np\nN, M = input().split()\nhito = []\nfor i in range(int(N)):\n hito.append(input().split())\n\nfor i in range(int(N)):\n hito[i] = list(map(int, hito[i]))\n\nfor i in range(int(N)):\n hito[i].pop(0)\n\nhikaku = np.arange(1,int(M)+1)\nfor i in range(int(N)):\n hikaku = list(set(hikaku) & set(hito[i]))\n\n\n\nprint(len(hikaku))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s015019024', 's973899616', 's973933557'] | [12508.0, 12488.0, 12504.0] | [148.0, 150.0, 149.0] | [298, 370, 340] |
p03126 | u533558052 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = [int(x) for x in input().split()] │\n │\nlikes = [0 for x in range(M)] │\n │\nfor n in range(N): │\n s = [int(x) for x in input().split()] │\n K = s[0] │\n for k in range(K): │\n likes[s[1+k] - 1] += 1 │\n │\nprint(likes.count(N))', 'N, M = [int(x) for x in input().split()]\n\nlikes = [0 for x in range(M)]\n\nfor n in range(N):\n s = [int(x) for x in input().split()]\n K = s[0]\n for k in range(K):\n likes[s[1+k] - 1] += 1\n\nprint(likes.count(N))'] | ['Runtime Error', 'Accepted'] | ['s076565609', 's402681498'] | [2940.0, 3060.0] | [17.0, 18.0] | [1231, 223] |
p03126 | u537782349 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['a, b = map(int, input().split())\nc = [0] * b\nfor i in range(a):\n d = list(map(int, input().split()))\n for j in range(1, d[0]+1):\n c[d[j]-1] += 1\ne = 0\nprint(c)\nfor i in range(b):\n if c[i] == a:\n e += 1\nprint(e)\n', 'a, b = map(int, input().split())\nc = {i + 1: 0 for i in range(b)}\nfor i in range(a):\n d = list(map(int, input().split()))\n for j in range(1, len(d)):\n c[d[j]] += 1\nd = 0\nfor k in c.keys():\n if c[k] == a:\n d += 1\nprint(d)\n'] | ['Wrong Answer', 'Accepted'] | ['s613310719', 's943363471'] | [3060.0, 3060.0] | [18.0, 18.0] | [234, 244] |
p03126 | u539517139 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nl=range(m+1)\nfor i in range(n):\n a=l and [map(int,input().split())][1:]\nprint(len(list(set(a))))', 'n,m=map(int,input().split())\na=[]\nb=[]\nf=list(range(m+1))\nfor _ in range(n):\n a.append(list(map(int,input().split()))[1:])\nfor i in range(1,m+1):\n g=0\n for j in range(n):\n if i not in a[j]:\n g=1\n break\n if g==0:\n b.append(i)\nprint(len(b))'] | ['Wrong Answer', 'Accepted'] | ['s614937870', 's422686991'] | [3060.0, 3064.0] | [17.0, 17.0] | [126, 258] |
p03126 | u540761833 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\narray2 = [0 for i in range(M+1)]\nfor i in range(N):\n array = list(map(int,input().split()))\n array.pop[0]\n for j in array:\n array2[j] += 1\nc = 0\nfor k in array2:\n if k == N:\n c += 1\nprint(c)\n ', 'N,M = map(int,input().split())\narray2 = [0 for i in range(M+1)]\nfor i in range(N):\n array = list(map(int,input().split()))\n array.pop(0)\n for j in array:\n array2[j] += 1\nc = 0\nfor k in array2:\n if k == N:\n c += 1\nprint(c)'] | ['Runtime Error', 'Accepted'] | ['s899290064', 's256032989'] | [2940.0, 3060.0] | [18.0, 17.0] | [234, 231] |
p03126 | u541017633 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['a, b = map(int, input().split())\nc = []\nfor i in range(a):\n *s, = map(int, input().split())\n c += s[1:]\ncount=[]\ne = c[:]\nd=list(set(c))\n\nfor i in d:\n if c.count(i) == a:\n count.append(i)\n else:continue', 'a, b = map(int, input().split())\nc = []\nfor i in range(a):\n *s, = map(int, input().split())\n c += s[1:]\ncount=[]\ne = c[:]\nd=list(set(c))\n\nfor i in d:\n if e.count(i) == a:\n count.append(i)\n \nprint(len(count))\nprint(e,d)', 'a, b = map(int, input().split())\nc = []\nfor i in range(a):\n *s, = map(int, input().split())\n c += s[1:]\ncount=[]\ne = c[:]\nd=list(set(c))\n \nfor i in d:\n if e.count(i) == a:\n count.append(i)', 'a, b = map(int, input().split())\nc = []\nfor i in range(a):\n *s, = map(int, input().split())\n c += s[1:]\ncount=[]\ne = c[:]\nd=list(set(c))\n\nfor i in d:\n if e.count(i) == a:\n count.append(i)\n \nprint(len(count))\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s143297122', 's711261837', 's756916777', 's139162767'] | [3060.0, 3064.0, 3064.0, 3060.0] | [18.0, 17.0, 18.0, 18.0] | [209, 227, 194, 217] |
p03126 | u543894008 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\n\nl = []\nfor i in range(N):\n K, *A = map(int, input().split())\n for k in range(K):\n l.append(A[k])\n\nprint(len(set(l)))', 'N, M = map(int, input().split())\n\nl = []\nfor i in range(N):\n K, *A = map(int, input().split())\n for k in range(K):\n l.append(A[k])\n\ncnt = 0\nfor i in list(set(l)):\n if l.count(i) == N:\n cnt = cnt + 1\n\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s950742972', 's754312877'] | [3060.0, 3060.0] | [17.0, 18.0] | [155, 219] |
p03126 | u546853743 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nc=[]\ncnt=0\nfor i in range(n):\n a=list(map(int,input().split()))\n for j in range(1,len(a)):\n c.append(a[j])\n \nfor j in range(1,m+1):\n if c.count(j)==n:\n cnt += 1\nprint(c)\nprint(cnt)', 'n,m=map(int,input().split())\nc=[]\ncnt=0\nfor i in range(n):\n a=list(map(int,input().split()))\n for j in range(1,len(a)):\n c.append(a[j])\n \nfor j in range(1,m+1):\n if c.count(j)==n:\n cnt += 1\nprint(cnt)\n'] | ['Wrong Answer', 'Accepted'] | ['s674675364', 's379652255'] | [9200.0, 9184.0] | [29.0, 29.0] | [235, 227] |
p03126 | u552357043 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\ntmp = []\nfor i in range(N):\n tmp1 = []\n K = list(map(int,input().split()))\n for j in range(1,K[0]+1):\n if i <= 0:\n tmp1.append(K[j])\n elif K[j] in tmp:\n tmp1.append(K[j])\n tmp = tmp1\n \nprint(len(tmp))\n ', 'N,M = map(int,input().split())\nlistM = list(range(1,M+1))\nfor i in range(N):\n K = list(map(int,input().split()))\n K.pop(0)\n a = []\n for j in range(len(listM)):\n if listM[j] not in K:\n \ta.append(listM[j])\n for j in range(len(a)):\n \tlistM.remove(a[j])\nprint(len(listM))\n '] | ['Wrong Answer', 'Accepted'] | ['s550508369', 's615364466'] | [3060.0, 3064.0] | [18.0, 18.0] | [303, 316] |
p03126 | u554954744 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M=map(int,input().split())\nS=(range(1,M+1))\nfor i in range(N):\n K,*A=map(int,input().split())\n S&=set(A)\nprint(len(S))', 'N,M=map(int,input().split())\nS=(range(1,M+1))\nfor i in range(N):\n K,*A=map(int,input().splirt())\n S&=set(A)\nprint(len(S))', 'N,M=map(int,input().split())\nS=set(range(1,M+1))\nfor i in range(N):\n K,*A=map(int,input().split())\n S&=set(A)\nprint(len(S))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s573625782', 's920600007', 's515534740'] | [3060.0, 2940.0, 3060.0] | [17.0, 24.0, 17.0] | [126, 127, 129] |
p03126 | u556086333 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['#coding: utf-8\n\nN, M = map(int, input().split())\n\nList = []\nall_and = []\nfor i in range(N):\n l = list(map(int, input().split()))\n #print(l)\n del l[0]\n #print(l)\n List.append(l)\n #print(List[i])\n #print(List)\n #print( )\n\n all_and = set(all_and) & set(List[i])\n all_and = List(all_and)\n\nall_and_list = list(all_and)\n#print(all_and)\n#print(all_and_list)\nprint(len(all_and_list))\n', '#coding: utf-8\n\nN, M = map(int, input().split())\n\nList = []\nall_and = []\nfor i in range(N):\n l = list(map(int, input().split()))\n print(l)\n del l[0]\n print(l)\n List.append(l)\n print(List[i])\n print(List)\n\n if i ==0:\n all_and = List[0]\n else:\n all_and = set(all_and) & set(List[i])\n all_and = list(all_and)\n print(all_and)\n print()\n\n#print(all_and)\nprint(len(all_and))\n', '#coding: utf-8\n\nN, M = map(int, input().split())\n\nList = []\nall_and = []\nfor i in range(N):\n l = list(map(int, input().split()))\n #print(l)\n del l[0]\n #print(l)\n List.append(l)\n #print(List[i])\n #print(List)\n #print( )\n\n all_and = set(all_and) & set(List[i])\n all_and = List(all_and)\n\nall_and_list = list(all_and)\n#print(all_and)\n#print(all_and_list)\nprint(len(all_and_list))\n', '#coding: utf-8\n\nN, M = map(int, input().split())\n\nList = []\nall_and = []\nfor i in range(N):\n l = list(map(int, input().split()))\n #print(l)\n del l[0]\n #print(l)\n List.append(l)\n #print(List[i])\n #print(List)\n #print( )\n\n all_and = set(all_and) & set(List[i])\n\nall_and_list = list(all_and)\n#print(all_and)\n#print(all_and_list)\nprint(len(all_and_list))\n', '#coding: utf-8\n\nN, M = map(int, input().split())\n\nList = []\nall_and = []\nfor i in range(N):\n l = list(map(int, input().split()))\n del l[0]\n List.append(l)\n all_and = set(all_and) & set(List[i])\n\nall_and_list = list(all_and)\nprint(len(all_and_list))\n', '#coding: utf-8\n\nN, M = map(int, input().split())\n\nList = []\nfor i in range(N):\n l = list(map(int, input().split()))\n #print(l)\n del l[0]\n #print(l)\n List.append(l)\n #print(List[i])\n #print(List)\n #print( )\n\n if i != 0:\n all_and = set(List[i-1]) & set(List[i])\n\nall_and_list = list(all_and)\nprint(len(all_and_list))\n\n', '#coding: utf-8\n\nN, M = map(int, input().split())\n\nList = []\nall_and = []\nfor i in range(N):\n l = list(map(int, input().split()))\n del l[0]\n List.append(l)\n\n if i ==0:\n all_and = List[0]\n else:\n all_and = set(all_and) & set(List[i])\n all_and = list(all_and)\n\n#print(all_and)\nprint(len(all_and))\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s215892450', 's518109380', 's741270917', 's851769578', 's890733670', 's929583816', 's897595316'] | [3060.0, 3064.0, 3064.0, 2940.0, 2940.0, 3060.0, 3060.0] | [19.0, 19.0, 17.0, 17.0, 17.0, 19.0, 18.0] | [406, 422, 406, 378, 261, 350, 330] |
p03126 | u556589653 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\nA = []\nS = []\nfor i in range(N):\n A.append(list(map(int,input().split())))\nfor i in range(1,K):\n S.append(A[i])\ns_count = [x for x in S if S.count(x) == N]\n print(len(S_count))', 'N,M = map(int,input().split())\nA = [0]*M\nans = 0\nfor i in range(N):\n k = list(map(int,input().split()))\n for j in range(1,len(k)):\n A[k[j]-1] += 1\nfor i in range(len(A)):\n if A[i] == N:\n ans += 1\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s225761691', 's868754951'] | [2940.0, 3060.0] | [17.0, 18.0] | [210, 215] |
p03126 | u559200744 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['nm = [int(i) for i in input().split()]\n\ntmp = [int(i) for i in input().split()]\ntmp2 = tmp[1:]\nlist = set(tmp2)\nfor i in range(1,nm[0]):\n tmp = [int(i) for i in input().split()]\n tmp2 = tmp[1:]\n list = set(tmp2) and list \nprint(len(list))\n', 'nm = [int(i) for i in input().split()]\n\ntmp = [int(i) for i in input().split()]\ntmp2 = tmp[1:]\nlist = set(tmp2)\nfor i in range(1,nm[0]):\n tmp = [int(i) for i in input().split()]\n tmp2 = tmp[1:]\n list = set(tmp2) & list \nprint(len(list))\n'] | ['Wrong Answer', 'Accepted'] | ['s772930952', 's891396732'] | [3060.0, 3060.0] | [18.0, 18.0] | [242, 240] |
p03126 | u560867850 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = [int(c) for c in input().split()]\n\nk = [list(map(int, input().split())) for _ in range(n)]\n\nfood_count = [0] * m\n\nfor p in k:\n for i in range(1, len(p)):\n food_count[p[i]-1] += 1\n\nprint(food_count)\ncount = 0\nfor f in food_count:\n if f == n:\n count += 1\n\nprint(count)\n', 'n, m = [int(c) for c in input().split()]\n\nk = [list(map(int, input().split())) for _ in range(n)]\n\nfood_count = [0] * m\n\nfor p in k:\n for i in range(1, len(p)):\n food_count[p[i]-1] += 1\n\ncount = 0\nfor f in food_count:\n if f == n:\n count += 1\n\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s158855931', 's698360011'] | [3064.0, 3064.0] | [18.0, 18.0] | [294, 275] |
p03126 | u562400059 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ["n = list(map(int, input().split()))\n\nlist = [list(map(int, input().split())) for i in range(n[0])]\n\na = {}\nfor i in list:\n for j in i[1:]:\n if j in a:\n a[j] = a[j] + 1\n else:\n a[j] = 1\n\ncnt = 0\nfor x in a.values():\n if x == n[0]:\n print(f'ok:{x}')\n cnt += 1\n\nprint(cnt)", "n = list(map(int, input().split()))\n\nlist = [list(map(int, input().split())) for i in range(n[0])]\n\na = {}\nfor i in list:\n for j in i[1:]:\n a[j] = a.get(j, 0) + 1\n\ncnt = 0\nfor x in a:\n if x == n[0]:\n print('同じ')\n cnt += 1\n\nprint(cnt)", 'n = list(map(int, input().split()))\n\nlist = [list(map(int, input().split())) for i in range(n[0])]\n\na = {}\nfor i in list:\n for j in i[1:]:\n if j in a:\n a[j] = a[j] + 1\n else:\n a[j] = 1\n\ncnt = 0\nfor x in a.values():\n if x == n[0]:\n cnt += 1\n\nprint(cnt)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s409256361', 's782579154', 's614117029'] | [2940.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [325, 264, 300] |
p03126 | u562753067 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = [int(x) for x in input().split(" ")]\n\nc = []\nd = []\nfor i in range(n):\n a = [int(x) for x in input().split(" ")]\n if i == 0:\n c = a[- a[0] + 1:]\n else:\n b = a[- a[0] + 1:]\n for ce in c:\n if ce in b:\n d.append(ce)\n c = d\n d = []\n\nprint(len(c))\n \n', 'n, m = [int(x) for x in input().split(" ")]\n\nc = []\nd = []\nfor i in range(n):\n\ta = [int(x) for x in input().split(" ")]\n\tif i == 0:\n c = a[- a[0] + 1:]\n else:\n b = a[- a[0]:]\n for ce in c:\n if ce in b:\n d.append(ce)\n c = d\n d = []\n\nprint(len(c))\n ', 'n, m = [int(x) for x in input().split(" ")]\n\nc = []\nd = []\nfor i in range(n):\n a = [int(x) for x in input().split(" ")]\n if i == 0:\n c = a[- a[0]:]\n else:\n b = a[- a[0]:]\n for ce in c:\n if ce in b:\n d.append(ce)\n c = d\n d = []\n\nprint(len(c))\n \n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s595729105', 's697170808', 's112666966'] | [3064.0, 2940.0, 3060.0] | [18.0, 18.0, 19.0] | [330, 319, 322] |
p03126 | u563722393 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nA_list = [[int(i) for i in input().split()] for n in range(N)] \n\nA_list[0].pop(0)\na = A_list[0]\nfor i in range(1, N):\n A_list[i].pop(0)\n a = set(a) & set(A_list[i])\n\nif len(a)==0:\n print(0)\nelse:\n print(a)', 'N, M = map(int, input().split())\nA_list = [[int(i) for i in input().split()] for i in range(N)] \n\na = A_list[0]\nfor i in range(1, N):\n a = set(a) & set(A_list[i])\n\nif len(a)==0:\n print(0)\nelse:\n print(a)', 'N, M = map(int, input().split())\nA_list = [[int(i) for i in input().split()] for i in range(N)] \n\na = A_list[0].pop(0)\nfor i in range(1, N):\n a = set(a) & set(A_list[i].pop(0))\n\nif len(a)==0:\n print(0)\nelse:\n print(a)', 'N, M = map(int, input().split())\nA_list = [[int(i) for i in input().split()] for n in range(N)] \n\nA_list[0].pop(0)\na = A_list[0]\nfor i in range(1, N):\n A_list[i].pop(0)\n a = set(a) & set(A_list[i])\n\nif len(a)==0:\n print(0)\nelse:\n print(len(a))'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s900794435', 's912214909', 's968782938', 's247745429'] | [3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0, 17.0] | [242, 206, 220, 247] |
p03126 | u577138895 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\na = []\ncounter = 0\ntotal = [0 for i in range(M + 1)]\ntmp = []\nfor i in range(N):\n tmp.append(list(map(int, input().split()))[1 :])\nprint(tmp)\nfor i in tmp:\n for j in i:\n total[j] += 1\nfor i in range(len(total)):\n if total[i] == N:\n counter += 1\n \nprint(counter)\n\n', 'N, M = map(int, input().split())\na = []\ncounter = 0\ntotal = [0 for i in range(M + 1)]\ntmp = []\nfor i in range(N):\n tmp.append(list(map(int, input().split()))[1 :])\nfor i in tmp:\n for j in i:\n total[j] += 1\nfor i in range(len(total)):\n if total[i] == N:\n counter += 1\n \nprint(counter)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s408367968', 's000172168'] | [3060.0, 3060.0] | [18.0, 18.0] | [308, 297] |
p03126 | u580873239 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nList=[]\nans=0\nfor i in range(n):\n k,*a=map(int,input().split())\n List+=a\nfor i in range(len(List)):\n if List.count(List[i])==n:\n ans+=1\n else:\n ans+=0\nprint(ans)\n', 'n,m=map(int,input().split())\nList=[]\nkosu=[]\nans=0\nfor i in range(n):\n k,*a=map(int,input().split())\n List+=a\n kosu.append(k)\nfor i in range(kosu[0]):\n if List.count(List[i])==n:\n ans+=1\n else:\n ans+=0\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s287432347', 's050596508'] | [3060.0, 3060.0] | [29.0, 18.0] | [215, 239] |
p03126 | u581187895 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, food = map(int, input().split())\nS = set(range(1,food+1))\nfor i in range(N):\n k, *a = ma(int,input().split())\n S &= set(a)\nprint(len(S))', 'N, food = input().split()\nlike_food = [input().split()[1:] for s in range(int(N))]\nlike_food =sum(like_food, [])\nset_food = set(like_food)\nprint(len(set_food))', 'N, food = input().split()\nS = set(range(1,food+1))\nfor i in range(N):\n k, *a = input().split()\n S &= set(a)\nprint(len(S))', 'N, food = map(int, input().split())\nS = set(range(1,food+1))\nfor i in range(N):\n k, *a = input().split()\n S &= set(a)\nprint(len(S))', 'N, M = map(int, input().split())\nse = set(range(1,M+1))\nfor _ in range(N):\n k, *A = map(int, input().split())\n se &= set(A)\n \nprint(len(se)) '] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s079891044', 's495987386', 's622617135', 's799058599', 's726634887'] | [3060.0, 3060.0, 2940.0, 3060.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 17.0] | [141, 159, 123, 133, 145] |
p03126 | u581403769 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = map(int, input().split())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\nl = [0] * m\nfor i in range(n):\n for j in range(m):\n if j + 1 in a[i][1:]:\n l[i] += 1\ncount = 0\nprint(l)\nfor i in range(n):\n if l[i] == n:\n count += 1\nprint(count)', 'n, m = map(int, input().split())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\nl = [0] * n\nfor i in range(m):\n for j in range(n):\n if i + 1 in a[j][1:]:\n l[i] += 1\ncount = 0\nprint(l)\nfor i in range(n):\n if l[i] == n:\n count += 1\nprint(count)', 'n, m = map(int, input().split())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\nl = [0] * m\nfor i in range(n):\n for j in range(m):\n if j + 1 in a[i][1:]:\n l[j] += 1\ncount = 0\nfor i in range(m):\n if l[i] == n:\n count += 1\nprint(count)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s053899677', 's371037608', 's642162893'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [298, 298, 289] |
p03126 | u581511366 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\nlist_a = [0]*M\nfor i in range(N):\n k = input().split()\n for K in range(1,int(k[0])):\n list_a[int(k[K])-1] += 1\n\nprint(list_a.count(N))', 'N,M = map(int,input().split())\nlist_a = [0]*M\nfor i in range(N):\n k = input().split()\n for K in range(1,int(k[0])+1):\n list_a[int(k[K])-1] += 1\n\nprint(list_a.count(N))'] | ['Wrong Answer', 'Accepted'] | ['s306229074', 's165325888'] | [3060.0, 3060.0] | [17.0, 18.0] | [178, 180] |
p03126 | u581603131 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ["N, M = map(int, input().split())\nlists = [list(map(int, input().split())) for i in range(N)]\nans = set(lists[0][1:])\nfor i in range(1, N):\n ans = set(lists[i][1:]) * ans\nprint(*list(ans), sep='')", 'N, M = map(int, input().split())\nlists = [list(map(int, input().split())) for i in range(N)]\nans = set(lists[0][1:])\nfor i in range(1, N):\n ans = set(lists[i][1:]) & ans\nprint(len(list(ans)))'] | ['Runtime Error', 'Accepted'] | ['s653168733', 's450338487'] | [3060.0, 3060.0] | [17.0, 17.0] | [198, 194] |
p03126 | u582588783 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import sys\n\nn,m=map(int,input().split())\nans=[]*(m+1)\noutput=0\n\nfor i in range(n):\n k=list(map(int,input().split()))\n for j in range(1,len(k)):\n ans[j]+=1\n\nfor i in ans:\n if ans[i]==n:\n output+=1\n\nprint(output)', 'import sys\n\nn,m=map(int,input().split())\nans=[0]*(m+1)\noutput=0\n\nfor i in range(n):\n k=list(map(int,input().split()))\n for j in range(1,len(k)):\n ans[k[j]]+=1\n\nfor i in ans:\n if i==n:\n output+=1\n\nprint(output)'] | ['Runtime Error', 'Accepted'] | ['s358156241', 's491011139'] | [9196.0, 9188.0] | [22.0, 28.0] | [233, 232] |
p03126 | u583276018 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = map(int, input().split())\ncnt = 0\nlike = []\nfrag = 1\nfor i in range(n):\n s = list(map(int, input().split()))\n like.append(s[1:])\nfor i in range(m):\n for j in range(n):\n \tif(!(i+1 in like[j])):\n frag = 0\n if(frag == 0):\n break\n if(frag == 1):\n cnt += 1\nprint(cnt)\n ', 'n, m = map(int, input().split())\ncnt = 0\nlike = []\nfrag = 1\nfor i in range(n):\n s = list(map(int, input().split()))\nfor i in range(m):\n for j in range(n):\n if(not(i+1 in like[j])):\n frag = 0\n break\n if(frag == 1):\n cnt += 1\n frag = 1\nprint(cnt)\n ', 'n, m = map(int, input().split())\ncnt = 0\nlike = []\nfrag = 1\nfor i in range(n):\n s = list(map(int, input().split()))\n like.append(s[1:])\nfor i in range(m):\n for j in range(n):\n if(not(i+1 in like[j])):\n frag = 0\n break\n if(frag == 1):\n cnt += 1\n frag = 1\nprint(cnt)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s336940717', 's643250250', 's102853777'] | [3064.0, 3060.0, 3064.0] | [17.0, 18.0, 17.0] | [293, 267, 285] |
p03126 | u585336982 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n+1):\n if listA[0][j] not in listA[i] and listA[0][j] == listA[i][0]:\n break\n else:\n \tx += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n):\n if listA[0][j] not in listA[i]:\n break\n x += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n+1):\n if listA[0][j] not in listA[i]:\n break\n x += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n):\n listB = []\n for k in range(1,listA[i][0]+1):\n \tlistB.append(listA[i][k])\n \tif listA[0][j] not in listB:\n \tbreak\n else:\n \tx += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n):\n if listA[0][j] not in listA[i]:\n break\n x += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n):\n listB = []\n for k in range(1,listA[i][0]+1):\n listB.append(listA[i][k])\n if listA[0][j] not in listB:\n break\n else:\n \tx += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n):\n if listA[0][j] not in listA[i] or listA[0][j] == listA[i][0]:\n break\n else:\n \tx += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n+1):\n if listA[0][j] not in listA[i] and listA[0][j] == listA[i][0]:\n break\n x += 1\nprint(x)', 'n,m = map(int,input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n\n except:\n break;\nx = 0\nfor j in range(1,listA[0][0]+1):\n for i in range(1,n):\n listB = []\n for k in range(1,listA[i][0]+1):\n listB.append(listA[i][k])\n if listA[0][j] not in listB:\n break\n else:\n \tx += 1\nprint(x)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s152902718', 's171807997', 's280865144', 's310438226', 's557380583', 's588290310', 's817618011', 's896485825', 's977034695'] | [3064.0, 3060.0, 3060.0, 3060.0, 3060.0, 3064.0, 3060.0, 3060.0, 3188.0] | [17.0, 17.0, 19.0, 17.0, 18.0, 18.0, 21.0, 17.0, 22.0] | [327, 287, 289, 388, 283, 389, 324, 320, 385] |
p03126 | u587742016 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ["answerers, num_foods = map(int, input().split(' '))\nfavorites = []\n\nfor i in range(answerers):\n current_ans = list(map(int, input().split(' ')))\n print(current_ans[1:])\n favorites.extend(current_ans[1:])\n\nres = [ favorites.count(food) == answerers for food in list(set(favorites)) ]\nprint(res.count(True))", "answerers, num_foods = map(int, input().split(' '))\nfavorites = []\n\nfor i in range(answerers):\n current_ans = list(map(int, input().split(' ')))\n favorites.extend(current_ans[1:])\n\nres = [ favorites.count(food) == answerers for food in list(set(favorites)) ]\nprint(res.count(True))"] | ['Wrong Answer', 'Accepted'] | ['s066183328', 's166653886'] | [3060.0, 3060.0] | [18.0, 18.0] | [308, 283] |
p03126 | u593567568 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\nLIKE = set()\n\nfor i in range(N):\n AK = list(map(int,input().split()))\n LIKE |= AK[1:]\n\nprint(len(LIKE))\n ', 'N,M = map(int,input().split())\nLIKE = [True] * M\n\nfor i in range(N):\n KA = list(map(int,input().split()))\n A = KA[1:]\n \n for i in range(M):\n if not (i+1) in A:\n LIKE[i] = False\n \nprint(LIKE.count(True))'] | ['Runtime Error', 'Accepted'] | ['s892943348', 's607890111'] | [9156.0, 9016.0] | [25.0, 31.0] | [149, 219] |
p03126 | u599925824 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int,input().split())\nS = [0] * M\nfor i in range(N):\n A = list(map(int, input().split()))[1:]\n for j in A:\n S[j]=S[j]+1\nfor y in S:\n if y == N:\n print(y)', 'N, M = map(int,input().split())\nS = [0] * M\nfor i in range(N):\n A = list(map(int, input().split()))[1:]\n for j in A:\n S[j-1]+1\n\ncount = 0\nfor y in S:\n if y == N:\n count+=1\nprint(count)', 'N, M = map(int,input().split())\nS = [0] * M\nfor i in range(N):\n A = list(map(int, input().split()))[1:]\n for j in A:\n S[j-1]+=1\n\ncount = 0\nfor y in S:\n if y == N:\n count+=1\n\nprint(count)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s029359982', 's693386759', 's975947686'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0] | [172, 193, 195] |
p03126 | u609814378 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['a', 'N, M = map(int, input().split())\n\nall_lis = []\n\nfor i in range(N):\n A = list(map(int, input().split()))\n A.pop(0)\n all_lis.extend(A)\n\nans = 0\nans_lis2 = []\n\nfor j in set(all_lis):\n ans = all_lis.count(j)\n ans_lis2.append(ans)\n\nans2 = 0 \nfor k in ans_lis2:\n if k == N:\n ans2 = ans2 + 1\n\nprint(ans2)\n '] | ['Runtime Error', 'Accepted'] | ['s293242051', 's453885735'] | [2940.0, 3060.0] | [17.0, 19.0] | [1, 331] |
p03126 | u611249982 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = [int(i) for i in input().split()]\ns = set([int(i + 1) for i in range(m)])\nfor ni in range(n):\n temp = [int(i) for i in input().split()]\n s &= set(temp[1:])\n\na = list(s)\nprint(a[0] if a != [] else 0)', 'n, m = [int(i) for i in input().split()]\ns = set([int(i + 1) for i in range(m)])\nfor ni in range(n):\n temp = [int(i) for i in input().split()]\n s &= set(temp[1:])\n\nprint(len(s))'] | ['Wrong Answer', 'Accepted'] | ['s131396555', 's946301757'] | [3060.0, 3060.0] | [17.0, 17.0] | [211, 183] |
p03126 | u611495846 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\na = []\nfor i in range(N):\n listed_a = list(map(int, input().split())).pop(0)\n a.append(set(listed_a))\n\n\nseki = a[0]\nfor i in range(N-1):\n seki = seki & a[i+1]\n \nprint(len(seki))\n', 'N, M = map(int, input().split())\na = []\nfor i in range(N):\n a.append(set(map(int, input().split())))\n\n\nseki = a[0]\nfor i in range(N-1):\n seki = seki & a[i+1]\n \nprint(len(seki))\n', 'N, M = map(int, input().split())\na = []\nfor i in range(N):\n listed_a = list(map(int, input().split()))\n listed_a.pop(0)\n a.append(set(listed_a))\n\n\nseki = a[0]\nfor i in range(N-1):\n seki = seki & a[i+1]\n \nprint(len(seki))\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s904649901', 's917188551', 's934902611'] | [3064.0, 3060.0, 3060.0] | [18.0, 19.0, 18.0] | [223, 186, 236] |
p03126 | u613401788 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import sys\nimport collections\ninput_lines = sys.stdin.readlines()\n\nN = input_lines[0].strip()[0]\nN = N.strip()\nN = int(N)\n\nnew = []\nfor i in range(1,len(input_lines)):\n tmp = input_lines[i].strip()\n tmp = tmp.split()\n for j in range(len(tmp)-1):\n\t new.append(tmp[j+1])\n \nc = collections.Counter(new)\n\n\ncnt = 0\nfor i in range(len(c.most_common())):\n print("i=",i,",",c.most_common()[i][1])\n if int(c.most_common()[i][1]) == N:\n print("hit")\n cnt += 1\n \nprint(cnt)', 'import sys\nimport collections\n\nN = int(sys.stdin.readline().strip().split()[0])\nprint("N=",N)\n\nnew = []\nfor i in range(N):\n tmp = sys.stdin.readline().strip().split()\n for j in range(len(tmp)-1):\n new.append(tmp[j+1])\n\nprint("new len:, ",len(new))\n \nc = collections.Counter(new)\n\n\ncnt = 0\nfor i in range(len(c.most_common())):\n if int(c.most_common()[i][1]) == N:\n cnt += 1\n else:\n break\n \nprint(cnt)', 'import sys\nimport collections\n\nN = int(sys.stdin.readline().strip().split()[0])\n\nnew = []\nfor i in range(N):\n tmp = sys.stdin.readline().strip().split()\n for j in range(len(tmp)-1):\n new.append(tmp[j+1])\n\nc = collections.Counter(new)\n\n\ncnt = 0\nfor i in range(len(c.most_common())):\n if int(c.most_common()[i][1]) == N:\n cnt += 1\n else:\n break\n \nprint(cnt)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s236611490', 's308284707', 's794246712'] | [3316.0, 3316.0, 3316.0] | [21.0, 21.0, 20.0] | [482, 419, 371] |
p03126 | u619197965 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=[int(i) for i in input().split()]\nans=[0]*m\na=[]\nfor i in range(n):\n hoge=[int(i) for i in input().split()[1:]]\n a.append(hoge)\nfor i in range(n):\n for j in range(len(a[i])):\n ans[a[i][j]-1]+=1\nprint(ans)\nprint(ans.count(n))', 'n,m=[int(i) for i in input().split()]\nans=[0]*m\na=[]\nfor i in range(n):\n hoge=[int(i) for i in input().split()[1:]]\n a.append(hoge)\nfor i in range(n):\n for j in range(len(a[i])):\n ans[a[i][j]-1]+=1\nprint(ans.count(n))'] | ['Wrong Answer', 'Accepted'] | ['s305724704', 's352786272'] | [3064.0, 3060.0] | [17.0, 19.0] | [244, 233] |
p03126 | u620846115 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,P = map(int,input().split())\nList=[]\nfor i in range(N):\n List+=list(map(int,input().split()))\ncount = 0\nfor i in range(P+1):\n if List.count(List[i])=N:\n count +=1\nprint(count)', 'N,M = map(int,input().split())\nfoods = [0]*(M+1)\nfor i in range(N):\n line = list(map(int,input().split()))\n for j in range(1,line[0]+1):\n foods[line[j]]+=1\nprint(foods.count(N))'] | ['Runtime Error', 'Accepted'] | ['s824055208', 's518905809'] | [8940.0, 9036.0] | [30.0, 31.0] | [184, 182] |
p03126 | u623687794 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m = int(input())\na = []\nb = [1 for i in range(m)]\nfor i in range(n):\n a.append(list(int(input()).split()))\nfor s in range(m):\n for i in range(n):\n if (s+1) in a[i] == False:\n b[s] = 0\ncnt = 0\nfor d in range(len(b)):\n if b[d] = 1:\n cnt+= 1\nprint(cnt)', 'n,m=map(int,input().split())\nfood=[0 for i in range(m)]\nfor i in range(n):\n per=list(map(int,input().split()))\n for j in range(1,per[0]+1):\n food[per[j]-1]+=1\nans=0\nfor i in range(m):\n if food[i] == n:\n ans+=1\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s247512028', 's297135898'] | [2940.0, 3060.0] | [17.0, 17.0] | [265, 230] |
p03126 | u623819879 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nans=set()\nb=set(range(1,m+1))\nans.union(b)\nfor n in range(n):\n s=list(map(int,input().split()))\n s=s[1:]\n ans=ans-s\nprint(len(ans))\n', 'n,m=map(int,input().split())\nans=set()\nans.add(range(1,m+1))\nfor n in range(n):\n s=list(map(int,input().split()))\n s=s[1:]\n ans=ans-s\nprint(len(ans))', 'n,m=map(int,input().split())\nans=set()\nb=set(range(1,m+1))\n#print(b)\nans=ans.union(b)\nfor n in range(n):\n #print(ans)\n s=list(map(int,input().split()))\n ex=b - set(s[1:])\n ans=ans-ex\nprint(len(ans))\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s463417125', 's591769664', 's579746654'] | [3060.0, 3060.0, 2940.0] | [18.0, 17.0, 17.0] | [164, 152, 204] |
p03126 | u625963200 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nS=set(range(1,m+1))\nfor i in range(n):\n K,*A=map(int,input().split())\nprint(len(S))', 'n,m=map(int,input().split())\nS=set(range(1,m+1))\nfor i in range(n):\n K,*A=map(int,input().split())\n S&=set(A)\nprint(len(S))'] | ['Wrong Answer', 'Accepted'] | ['s663863014', 's394908507'] | [3060.0, 3060.0] | [18.0, 18.0] | [115, 129] |
p03126 | u626337957 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nfoods = [0]*(M)\n\nfor i in range(N):\n person = list(map(int, input().split()))\n for j in range(M):\n if j in person:\n foods[j] += 1\nans = 0\nfor i in range(M):\n if foods[i] == N:\n ans += 1\nprint(ans)', 'N, M = map(int, input().split())\nfoods = [0]*(M+1)\n\nfor i in range(N):\n person = list(map(int, input().split()))\n for j in range(1,M+1):\n if j in person[1:]:\n foods[j] += 1\nans = 0\nfor i in range(1,M+1):\n if foods[i] == N:\n ans += 1\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s043270867', 's165984907'] | [3060.0, 3060.0] | [19.0, 18.0] | [243, 258] |
p03126 | u626881915 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nc = [0]*m\nfor i in range(n):\n a = list(map(int, input().split()))\n for e in a:\n c[e-1] += 1\nprint(c.count(n))', 'n,m=map(int,input().split())\nc = [0]*m\nfor i in range(n):\n a = list(map(int, input().split()))\n for e in a[1:]:\n c[e-1] += 1\nprint(c.count(n))\n'] | ['Wrong Answer', 'Accepted'] | ['s221538928', 's882478892'] | [2940.0, 2940.0] | [18.0, 18.0] | [143, 148] |
p03126 | u629350026 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import itertools\nn,m=map(int,input().split())\na=[]\nfor i in range(0,n):\n a.append(list(map(int,input().split())))\n del a[i][0]\na=list(itertools.chain.from_iterable(a))\ncount=0\nfor i in range(0,m):\n if a.count(i)==n\n count=count+1\nprint(count)', 'import itertools\nn,m=map(int,input().split())\na=[]\nfor i in range(0,n):\n a.append(list(map(int,input().split())))\n del a[i][0]\na=list(itertools.chain.from_iterable(a))\ncount=0\nfor i in range(0,m):\n if a.count(i+1)==n:\n count=count+1\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s385476629', 's332298941'] | [2940.0, 3064.0] | [17.0, 18.0] | [246, 251] |
p03126 | u632974276 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, k = [int(i) for i in input().split()]\nlines = [set(input().split()[1:]) for i in range(n)]\ndiff = set(lines[0])\nfor i in range(1,len(lines)):\n diff = diff&line\nprint(len(diff))', 'n, k = [int(i) for i in input().split()]\nlines = [set(input().split()[1:]) for i in range(n)]\ndiff = set()\nfor line in lines:\n diff = diff&line\nprint(len(diff))\n', 'n, k = [int(i) for i in input().split()]\nlines = [set(input().split()[1:]) for i in range(n)]\ndiff = set(lines[0])\nfor i in range(1,len(lines)):\n diff = diff&lines[i]\nprint(len(diff))\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s347155852', 's868862742', 's822579000'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [180, 162, 185] |
p03126 | u633548583 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nfor i in range(n):\n k,*a=list(map(int,input().split()))\n b=a[0]\n for j in range k:\n b=b-a[j]\n print(len(b))\n \n ', 'n,m=map(int,input().split())\nfor i in range(n):\n k,*a=list(map(int,input().split()))\n b=set(a[0])\n for j in range(k):\n b=b-set(a[j])\n print(len(list(b)))\n \n \n', 'n,m=map(int,input().split())\ns=set(range(1,m+1))\nfor i in range(n):\n k,*a=map(int,input().split())\n s&=set(a)\nprint(les(s))\n', 'n,m=map(int,input().split())\nfor i in range(n):\n k,*a=list(map(int,input().split()))\n b=a[0]\n for j in range(k):\n b=b-a[j]\n print(len(b))\n \n \n', 'n,m=map(int,input().split())\ns=set(range(1,m+1))\nfor i in range(n):\n k,*a=list(map(int,input().split()))\n s&=set(a)\nprint(les(s))', 'n,m=map(int,input().split())\ns=set(range(1,m+1))\nfor i in range(n):\n k,*a=list(map(int,input().split()))\n s&=set(a)\nprint(len(s))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s204412930', 's269418749', 's333515761', 's642229960', 's819979759', 's801052566'] | [2940.0, 3060.0, 3060.0, 2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 18.0, 18.0, 18.0] | [169, 187, 130, 171, 135, 135] |
p03126 | u635156724 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M=[int(i) for i in input().split()]\ntotal_list=[]\nfor i in range(N):\n total_list.append([int(i) for i in input().split()])\ntotal_set=set()\nfor i in total_list:\n for j,num in enumerate(i):\n if j!=0:\n total_set.add(num)\nprint(len(total_set))', 'N,M=[int(i) for i in input().split()]\nfoods=set(range(1,M+1))\nfor i in range(N):\n foods=foods&set([int(i) for i in input().split()][1:])\nprint(len(foods))'] | ['Wrong Answer', 'Accepted'] | ['s723785380', 's071685149'] | [3060.0, 3060.0] | [18.0, 18.0] | [265, 157] |
p03126 | u635182517 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m = list(map(int, input().split()))\nk = list(list(map(int, input().split())) for _ in range(n))\nc = 0\nf = 0\nfor i in range(m):\n for j in range(n):\n if not i in k[j]:\n f == 1\n\n if f == 0:\n c += 1\n\nprint(c)', 'n,m = list(map(int, input().split()))\nk = list(list(map(int, input().split())) for _ in range(n))\nc = 0\nf = 0\nfor i in range(m):\n for j in range(n):\n if not i in k[j][1:]:\n f == 1\n\n if f == 0:\n c += 1\n\nprint(c)', 'n,m = list(map(int, input().split()))\nk = list(list(map(int, input().split())) for _ in range(n))\nc = 0\n\nfor i in range(m):\n f = 0\n for j in range(n):\n if not i+1 in k[j][1:]:\n f = 1\n #print(i+1)\n #print(k[j][1:])\n if f == 0:\n c += 1\n\nprint(c)\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s655220710', 's824685467', 's532764644'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0] | [238, 242, 302] |
p03126 | u637824361 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int,input().split())\nS = {i+1 for i in range(M)}\n\nfor i in range(N):\n L = [int(j) for j in input().split()]\n K = set(L[1::])\n S = S & K\n print(S)\nprint(len(S))\n\n', 'N, M = map(int,input().split())\nS = {i+1 for i in range(M)}\n\nfor i in range(N):\n L = [int(j) for j in input().split()]\n K = set(L[1::])\n S = S & K\n \nprint(len(S))\n\n'] | ['Wrong Answer', 'Accepted'] | ['s069907105', 's382734045'] | [3060.0, 3060.0] | [18.0, 17.0] | [184, 176] |
p03126 | u640922335 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA.pop(0)\nfor _ in range(N-1):\n B=list(map(int,input().split()))\n for num in A[1:]:\n if num not in B:\n A.remove(num)\n\nprint(len(A))', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA.pop(0)\n\nif N>1:\n for _ in range(N-1):\n B=list(map(int,input().split()))\n B.pop(0)\n A=[num for num in A if num in B]\n\nprint(len(A))'] | ['Wrong Answer', 'Accepted'] | ['s908051207', 's343995727'] | [3060.0, 3060.0] | [18.0, 18.0] | [216, 218] |
p03126 | u647767910 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = map(int, input().split())\nA = [[int(a) for a in input().split()] for i in range(n)]\nB = []\nfor i, j in enumerate(A):\n if i == 0:\n B = j[1:]\n else:\n B = list(set(j[1:]) & set(B))\nprint(B)', 'n, m = map(int, input().split())\nans = 0\na = []\nfor i in range(n):\n s = list(input().split())\n a = a + s[1:]\nfor i in range(1, m + 1):\n if a.count(str(i)) == n:\n ans += 1\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s493635648', 's468451977'] | [3060.0, 3060.0] | [18.0, 18.0] | [213, 198] |
p03126 | u657221245 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['a = list(map(int, input().split()))\nk = []\nfor i in range(0, a[0]):\n b = list(map(int, input().split()))\n del b[0]\n k.append(b)\n \nkk = 0\nfor i in range(1, a[1] + 1):\n if k.count(i) == a[0]:\n kk += 1\nprint(q)', 'a = list(map(int, input().split()))\nk = []\nfor i in range(0, a[0]):\n b = list(map(int, input().split()))\n del b[0]\n k.append(b)\n\nq = 0\nfor i in range(1, a[1] + 1)\n if k.count(i) == a[0]:\n q += 1\nprint(q)', 'a = list(map(int, input().split()))\nk = []\nfor i in range(0, a[0]):\n b = list(map(int, input().split()))\n del b[0]\n k += b\n\nkk = 0\nfor i in range(1, a[1] + 1):\n if k.count(i) == a[0]:\n kk += 1\nprint(kk)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s601454770', 's887710014', 's533164273'] | [3060.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0] | [214, 210, 209] |
p03126 | u657913472 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\na=[]\nfor _ in range(n):\n _,*b=map(int,input().split())\n a+=b\nprint(sum(n==a.count i+1for i in range(m)))', 'n,m=map(int,input().split())\na=[]\nfor _ in range(n):\n _,*b=map(int,input().split())\n a+=b\nprint(sum(n==a.count(i+1)for i in range(m)))'] | ['Runtime Error', 'Accepted'] | ['s229152158', 's765081377'] | [2940.0, 2940.0] | [18.0, 18.0] | [135, 136] |
p03126 | u663561584 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = list(map(int,"1 30".split()))\n\nref = [i+1 for i in range(M)]\nLIKE = [i+1 for i in range(M)]\n\nfor i in range(N):\n myLIKE = list(map(int,"3 5 10 30".split()[1:]))\n for j in ref:\n if j not in myLIKE:\n LIKE.remove(j)\nprint(len(LIKE))', 'N,M = list(map(int,input().split()))\n\nref = [i+1 for i in range(M)]\nLIKE = [i+1 for i in range(M)]\n\nfor i in range(N):\n myLIKE = list(map(int,input().split()[1:]))\n for j in ref:\n if j not in myLIKE:\n LIKE.remove(j)\nprint(len(LIKE))', 'N,M = list(map(int,input().split()))\n\nref = [i+1 for i in range(M)]\nLIKE = [i+1 for i in range(M)]\n\nfor i in range(N):\n myLIKE = list(map(int,input().split()[1:]))\n for j in ref:\n try:\n if j not in myLIKE:\n LIKE.remove(j)\n except ValueError:\n pass\n \nprint(len(LIKE))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s521311377', 's933089688', 's735297099'] | [3060.0, 3060.0, 3060.0] | [19.0, 18.0, 18.0] | [259, 256, 334] |
p03126 | u674190122 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['nb_people, nb_foods = [int(x) for x in input().split()]\nlike_count = {}\nfor _ in range(nb_people):\n _, *liked = [int(x) for x in input().split()]\n for i in liked:\n like_count[i] = like_count.get(i, 0) + 1\n cnt = 0\n for x in like_count.values():\n if x == nb_people:\n cnt += 1\n print(cnt)\n\n\n', 'nb_people, nb_foods = [int(x) for x in input().split()]\nlike_count = {}\nfor _ in range(nb_people):\n _, *liked = [int(x) for x in input().split()]\n for i in liked:\n like_count[i] = like_count.get(i, 0) + 1\ncnt = 0\nfor x in like_count.values():\n if x == nb_people:\n cnt += 1\nprint(cnt)\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s148136799', 's833094183'] | [3060.0, 3060.0] | [17.0, 19.0] | [329, 308] |
p03126 | u676496404 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nb=list(map(int,input().split()))\na=set()\nfor i in range(1,m+1):\n a.add(i)\nb=set(b[1::])\na &= b\nprint(len(a))', 'n,m=map(int,input().split())\na = set()\nfor i in range(1,m+1):\n a.add(i)\nfor i in range(n):\n b = list(map(int,input().split()))\n b = set(b[1::])\n a &= b\nprint(len(a))'] | ['Wrong Answer', 'Accepted'] | ['s604464031', 's856717306'] | [3064.0, 3060.0] | [17.0, 20.0] | [140, 177] |
p03126 | u677705680 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\n\nbag = {m+1: 0 for m in range(M)}\n\nfor n in range(N):\n all_list = list(map(int, input().split()))\n K = all_list[0]\n A = all_list[1:]\n for k in range(K):\n bag[A[k]] *= 1\n\ncount = sum(bag.values())\n\nprint(count)\n ', 'N, M = map(int, input().split())\n\nbag = {m+1: 0 for m in range(M)}\n\nfor n in range(N):\n all_list = list(map(int, input().split()))\n K = all_list[0]\n A = all_list[1:]\n for k in range(K):\n bag[A[k]] += 1\n\ncount = 0\nfor key, value in bag.items():\n if value == N:\n count += 1\n\nprint(count)\n '] | ['Wrong Answer', 'Accepted'] | ['s440236886', 's984752005'] | [3060.0, 3060.0] | [18.0, 18.0] | [270, 323] |
p03126 | u681110193 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\ncount=0\ns=[[0 for i in range(n)] for i in range(m)]\nprint(s)\nfor j in range(n):\n L=list(map(int,input().split()))\n\n for i in range(1,L[0]+1):\n s[L[i]-1][j]=1\nprint(s)\nfor i in range(m):\n if s[i]==[1]*n:\n count+=1\n\nprint(count)', 'n,m=map(int,input().split())\ncount=0\ns=[[0 for i in range(n)] for i in range(m)]\n\nfor j in range(n):\n L=list(map(int,input().split()))\n\n for i in range(1,L[0]+1):\n s[L[i]-1][j]=1\n\nfor i in range(m):\n if s[i]==[1]*n:\n count+=1\n\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s571648614', 's646813061'] | [3064.0, 3060.0] | [18.0, 20.0] | [264, 248] |
p03126 | u682467216 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m = map(int,input().split())\nfor i in range(n):\n k,a = input().split()[0] , input().split()[1:]\ncount = 0\nfor i in range(n):\n if a.count(k[i]) == n:\n count += 1\nprint(count)\n \n', 'n,m = map(int, input().split())\nans = list(input().split())\nans = set(ans[1:])\nfor i in range(n-1):\n b = list(input().split())\n b = set(b[1:])\n ans = ans & b\nprint(len(ans))'] | ['Runtime Error', 'Accepted'] | ['s715692559', 's426813577'] | [2940.0, 3060.0] | [17.0, 18.0] | [184, 182] |
p03126 | u685662874 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int, input().split())\ncnt = [0]*m\nfor i in range(n):\n like = list(map(int, input().split()))\n k = like.pop(0)\n for j in like:\n cnt[j] += 1\n\nall_like=0\nfor _ in cnt:\n if _ == n:\n all_like += 1\n', 'n,m=map(int, input().split())\ncnt = [0]*m\nfor i in range(n):\n like = list(map(int, input().split()))\n k = like.pop(0)\n for j in like:\n cnt[j-1] += 1\n\nall_like=0\nfor _ in cnt:\n if _ == n:\n all_like += 1\nprint(all_like)'] | ['Runtime Error', 'Accepted'] | ['s264896718', 's606661209'] | [2940.0, 3064.0] | [17.0, 17.0] | [226, 243] |
p03126 | u686036872 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nlist=[]\ns=[]\nif N == 1:\n print(len(input())-1)\nelse:\n for i in range(N):\n list.append(input().split())\n s = set(s) & set(list[1:])\n list=[]\n print(len(s)) ', 'N, M = map(int, input().split())\ns={}\nfor i in range(N):\n list.append(input().split()[1:])\n a = set(list)\n s = s & a\nprint(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns=[]\nfor i in range(N):\n list.append(input().split())\n s = set(s) & set(list[1:])\n list=[]\nprint(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns={}\nfor i in range(N):\n list.append(input().split())\n a = set(list[1:])\n s = s & a\n list=[]\nprint(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns={}\nfor i in range(N):\n list.append(input().split()[1:])\n a = set(list)\n s = s & a\nprint(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns=set(range(1, M+1))\nfor i in range(N):\n list.append(input().split())\n s &= set(list[1:])\n list=[]\nprint(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns=[]\nif N == 1:\n a, *b=map(int, input().split())\n print(a)\nelse:\n for i in range(N):\n list.append(input().split())\n s = set(s) & set(list[1:])\n list=[]\n print(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns=[]\nif N == 1:\n a, *b=map(int, input().split())\n print(a)\nelse:\n for i in range(N):\n list.append(input().split())\n s &= set(list[1:])\n list=[]\n print(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns=[]\nif N = 1:\n print(len(input())-1)\nelse:\n for i in range(N):\n list.append(input().split())\n s = set(s) & set(list[1:])\n list=[]\n print(len(s)) ', 'N, M = map(int, input().split())\nlist=[]\ns=set(range(1, M+1))\nfor i in range(N):\n K, *A = map(int, input().split())\n s &= set(A)\nprint(len(s)) '] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s032011256', 's080592998', 's311020830', 's562266235', 's679403111', 's822824427', 's858513973', 's893387098', 's971301853', 's619490347'] | [3060.0, 2940.0, 3060.0, 2940.0, 3060.0, 3060.0, 3060.0, 3060.0, 2940.0, 3060.0] | [17.0, 18.0, 17.0, 18.0, 18.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [218, 140, 155, 160, 148, 163, 241, 233, 217, 149] |
p03126 | u690326927 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nL = [list(map(int, input().split())) for _ in range(N)]\nALL = sum(list(map(lambda x: x[1:], L)), [])\nprint(list(map(lambda x: ALL.count(x), ALL)).count(N))\n', 'N, M = map(int, input().split())\nL = [list(map(int, input().split())) for _ in range(N)]\nALL = sum(list(map(lambda x: x[1:], L)), [])\n\nans = 0\nfor i in set(ALL):\n if ALL.count(i) is N:\n ans += 1\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s725933433', 's555589731'] | [3060.0, 3064.0] | [28.0, 19.0] | [189, 217] |
p03126 | u691018832 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = map(int, input().split())\nans = 0\nk = [0] * n\na = [0] * n\nfor i in range(n):\n k[i], a[i] = int(input()), [int(j) for j in input().split()]\n \nfor match in range(1, m):\n for l in range(n):\n if match in a[i]:\n ans += 1\n\nprint(ans)', 'n, m = map(int, input().split())\nans = 0\nk = [0] * n\na = [0] * n\nfor i in range(n):\n k[i] = int(input())\n a[i] = [int(input()) for j in range(k[i])]\n \nfor match in range(1, m):\n for l in range(n):\n if match in a[i]:\n ans += 1\n\nprint(ans)', 'import sys\ninput = sys.stdin.readline\n\nn, m = map(int, input().split())\nka = []\nans = 0\nfor i in range(n):\n ka_memo = list(map(int, input().split()))\n ka.append(ka_memo[1:])\n\nfor i in range(1, m + 1):\n flg = True\n for j in range(n):\n if i not in ka[j]:\n flg = False\n break\n if flg:\n ans += 1\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s509454521', 's530890495', 's742661950'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0] | [261, 267, 354] |
p03126 | u692453235 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nans = [0]*M\n\nfor _ in range(N):\n K, *A = map(int, input().split())\n for x in A:\n ans[x-1] += 1\n\nprint(sum([i for i in ans if i == N]))', 'N, M = map(int, input().split())\nans = [0]*M\n\nfor _ in range(N):\n K, *A = map(int, input().split())\n for x in A:\n ans[x-1] += 1\n\nprint(sum([1 for i in ans if i == N]))'] | ['Wrong Answer', 'Accepted'] | ['s148560896', 's484511987'] | [9132.0, 9024.0] | [28.0, 28.0] | [172, 172] |
p03126 | u693716675 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=[int(i) for i in input().split()]\n\ns=set()\nfor i in range(m):\n s.add(i+1)\n\n\nfor i in range(n):\n a= [int(j) for j in input().split()]\n a.pop(0)\n a=set(a)\n s=s and a\n\nprint(len(s))', 'n,m=[int(i) for i in input().split()]\n\ns=set()\nfor i in range(m):\n s.add(i+1)\n\n\nfor i in range(n):\n a= [int(j) for j in input().split()]\n a.pop(0)\n a=set(a)\n s=s and a\n\nprint(len(s))\n', 'n,m=[int(i) for i in input().split()]\n\ns=set()\nfor i in range(m):\n s.add(i+1)\n\n\nfor i in range(n):\n a= [int(j) for j in input().split()]\n a.pop(0)\n a=set(a)\n s=s & a\n\nprint(len(s))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s195477913', 's213152560', 's069591012'] | [3060.0, 3060.0, 3060.0] | [17.0, 19.0, 17.0] | [197, 198, 195] |
p03126 | u698176039 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\nA = [list(map(int,input.split())) for _ in range(N)]\n\nlike = [0] * M\n\nfor i in range(N):\n for j in range(A[i][0]):\n like[A[i][j+1]] += 1\n \ncnt = 0\nfor i in range(M):\n if like[i] == M:\n cnt += 1\n\nprint(cnt)', 'N,M = map(int,input().split())\nA = [list(map(int,input().split())) for _ in range(N)]\nlike = [0] * M\n\nfor i in range(N):\n for j in range(A[i][0]):\n like[A[i][j+1]-1] += 1\n \ncnt = 0\nfor i in range(M):\n if like[i] == N:\n cnt += 1\n\nprint(cnt)'] | ['Runtime Error', 'Accepted'] | ['s942946204', 's857165944'] | [3064.0, 3064.0] | [17.0, 18.0] | [263, 266] |
p03126 | u698501671 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\nKA = list(map(int,input(),split()))\n\nitems = set(KA[1:])\n\n\nfor i in range(1,N):\n KA = list(map(int,input().split()))\n items = items & set(KA[1:])\n\nans = len(items)\nprint(ans)\n', 'N,M = map(int,input().split())\nKA = list(map(int,input().split()))\n\nitems = set(KA[1:])\n\n\nfor i in range(1,N):\n KA = list(map(int,input().split()))\n items = items & set(KA[1:])\n\nans = len(items)\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s923446012', 's240890832'] | [2940.0, 3060.0] | [17.0, 17.0] | [212, 212] |
p03126 | u705418271 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M=map(int,input().split())\nfoods=[0]*M\n\nfor i in range(N):\n KA=list(map(int,input().split())\n for a in KA[1: ]:\n foods[a-1]+=1\n\ncnt=0\nfor j in foods:\n if j==N:\n cnt+=1\n\nprint(cnt)', 'N,M=map(int,input().split())\nfoods=[0]*M\n\nfor i in range(N):\n KA=list(map(int,input().split())\n\n\n for a in KA[1:]:\n foods[a-1]+=1\n\ncnt=0\nfor j in foods:\n if j==N:\n cnt+=1\n\nprint(cnt)\n', 'N,M=map(int,input().split())\nfoods=[0]*M\n\nfor i in range(N):\n KA=list(map(int,input().split())\n\n\nfor a in KA[1:]:\n foods[a-1]+=1\n\ncnt=0\nfor j in foods:\n if j==N:\n cnt+=1\n\nprint(cnt)\n', 'N,M=map(int,input().split())\nfoods=[0]*M\n\nfor i in range(N):\n KA=list(map(int,input().split())\n for a in KA[1:]:\n foods[a-1]+=1\n\ncnt=0\nfor j in foods:\n if j==N:\n cnt+=1\n\nprint(cnt)\n\n', 'N,M = map(int,input().split())\nfoods = [0]*M\n \nfor i in range(N):\n KA = list(map(int,input().split()))\n \n for a in KA[1:]:\n foods[a-1] += 1\n \ncnt = 0\nfor j in foods:\n if j == N:\n cnt += 1\n \nprint(cnt)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s391295851', 's795222984', 's902004066', 's912308200', 's073816821'] | [8992.0, 8832.0, 8876.0, 8884.0, 9124.0] | [25.0, 22.0, 31.0, 23.0, 31.0] | [190, 192, 188, 191, 214] |
p03126 | u711238850 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m = tuple(map(int,input()))\n\ncheck = [0]*m\n\nfor i in range(n):\n for a_i in tuple(map(int,input()))[1:]:\n check[a_i]+=1\n \nprint(check.count(n))', 'n,m = tuple(map(int,input().split()))\n\ncheck = [0]*m\n\nfor i in range(n):\n for a_i in tuple(map(int,input().split()))[1:]:\n check[a_i-1]+=1\n \nprint(check.count(n))\n'] | ['Runtime Error', 'Accepted'] | ['s530672514', 's999722061'] | [2940.0, 2940.0] | [17.0, 18.0] | [151, 170] |
p03126 | u712975113 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import numpy as np\nN,M=map(int,input().split())\nA=np.zeros((N+1,M+1))\nA[0]=np.ones(M+1)\nfor i in range(1,N+1):\n B=list(map(int,input().split()))\n for m in range(1,B[0]+1):\n A[i][B[m]]=A[i-1][B[m]]\na=sum(A[N])\nprint(a)', 'N,M=map(int,input().split())\na = [[1 for _ in range(M)]+[0 for _ in range(M)] for _ in range(N)]\nfor i in range(1,N+1):\n B=list(map(int,input().split()))\n for m in range(1,B[0]+1):\n A[i][B[m]]=A[i-1][B[m]]\na=sum(A[N])\nprint(int(a))', 'N,M=map(int,input().split())\nA = [[1 for _ in range(M)]]+[[0 for _ in range(M)] for _ in range(N)]\nfor i in range(1,N+1):\n B=list(map(int,input().split()))\n Ai=B[1:]\n for m in Ai:\n A[i][m-1]=A[i-1][m-1]\na=sum(A[N])\nprint(int(a))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s024295465', 's481936282', 's171225616'] | [12640.0, 3064.0, 3064.0] | [153.0, 18.0, 18.0] | [230, 244, 244] |
p03126 | u713914478 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int, input().split())\nA = [input().split() for _ in range(N)]\n\nB = [0]*30\n\nfor i in range(N):\n\tfor j in range(int(A[i][0])):\n\t\tprint(i,j)\n\t\tB[int(A[i][j])] += 1\n\nprint(B.count(N)) \n', 'N,M = map(int, input().split())\n\nB = [0]*30\n\nfor i in range(N):\n\tK, *A = map(int, input().split())\n\tfor a in A:\n\t\tB[a-1] += 1\n\nprint(sum(c == N for c in B))'] | ['Runtime Error', 'Accepted'] | ['s833649607', 's296183671'] | [3188.0, 2940.0] | [18.0, 18.0] | [191, 156] |
p03126 | u720636500 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nlis = [[int(x) for x in input().split()] for _ in range(N)]\nans = 0\nfor item in range(1, M + 1):\n for i in lis:\n if not item in i:\n break\n else:\n ans += 1\nprint(ans) ', 'N, M = map(int, input().split())\nlis = [[int(x) for x in input().split()] for _ in range(N)]\nans = 0\nfor item in range(1, M + 1):\n for i in lis[1:]:\n if not item in i:\n break\n else:\n ans += 1\nprint(ans) ', 'N, M = map(int, input().split())\nlis = [[int(x) for x in input().split()] for _ in range(N)]\nans = 0\nfor item in range(1, M + 1):\n for i in lis:\n if not item in i[1:]:\n break\n else:\n ans += 1\nprint(ans) '] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s566127360', 's774313082', 's416838053'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0] | [215, 219, 219] |
p03126 | u729119068 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int, input().split())\nA=set(range(1, m+1))\nfor _ in range(n):\n a,*b=map(int, input().split())\n A = A & set(*b)\nprint(len(A))', 'n,m=map(int, input().split())\nA=set(range(1, m+1))\nfor _ in range(n):\n a,*b=map(int, input().split())\n A = A & set(b)\nprint(len(A))'] | ['Runtime Error', 'Accepted'] | ['s837383019', 's298753756'] | [9128.0, 9168.0] | [24.0, 25.0] | [134, 133] |
p03126 | u732963817 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['(n, m) = map(int, input().split())\nl = [set(list(map(int, input().split()))[1:]) for _ in range(n)]\nlen(l[0].intersection(*l[1:]))', '(n, m) = map(int, input().split())\nl = [set(list(map(int, input().split()))[1:]) for _ in range(n)]\nprint(len(l[0].intersection(*l[1:])))'] | ['Wrong Answer', 'Accepted'] | ['s531609377', 's458488444'] | [3060.0, 3060.0] | [17.0, 17.0] | [130, 137] |
p03126 | u739362834 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = map(int, input().split())\nl = [str(x) for x in range(1, m + 1)]\nprint(l)\ni = 0\nwhile (i < n):\n k = [str(x) for x in input().split()]\n del k[0]\n l = list(set(l) & set(k))\n i += 1\nprint(len(l))\n', 'n, m = map(int, input().split())\nl = [str(x) for x in range(1, m + 1)]\ni = 0\nwhile (i < n):\n k = [str(x) for x in input().split()]\n del k[0]\n l = list(set(l) & set(k))\n i += 1\nprint(len(l))\n'] | ['Wrong Answer', 'Accepted'] | ['s888728492', 's100037958'] | [3060.0, 3060.0] | [18.0, 18.0] | [211, 202] |
p03126 | u739528957 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = (int(i) for i in input().split())\ne = [[int(i) for i in input().split()] for i in range(n)]\ndic = {}\nfor hobbies in e:\n for i in range(1,len(hobbies)+1):\n if hobbies[i] in dic:\n dic[hobbies[i]] +=1\n else:\n dic[hobbies[i]] = 0\neveryoneLike = []\nfor key,num in dic.items():\n if num == n:\n everyoneLike.append(key)\nprint(len(everyoneLike))\n', 'n, m = (int(i) for i in input().split())\ne = [[int(i) for i in input().split()] for i in range(n)]\ndic = {}\nfor hobbies in e:\n for i in range(1,len(hobbies)):\n if hobbies[i] in dic:\n dic[hobbies[i]] +=1\n else:\n dic[hobbies[i]] = 1\neveryoneLike = []\nfor key,num in dic.items():\n if num == n:\n everyoneLike.append(key)\nprint(len(everyoneLike))\n'] | ['Runtime Error', 'Accepted'] | ['s040434709', 's849306449'] | [3064.0, 3064.0] | [18.0, 18.0] | [393, 391] |
p03126 | u744517446 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n = int(input())\nk = 0\nalist = []\nwhile k < n :\n a = list(map(int,input().split()))\n alist.append(a)\n k += 1\n#\nfor blist in alist :\n b = blist[0]\n blist.remove(b)\n#\nanslist = []\nans = 0\ni_roop = len(alist[0])\nwhile i_roop >= 0 :\n if i_roop == 0 :\n break\n else:\n c = min(alist[0])\n for j in range(1,n) :\n if c in alist[j] :\n anslist.append("OK")\n if j == n-1 :\n if len(anslist) == n-1 :\n ans += 1\n else:\n if j == n-1 :\n if len(anslist) == n-1 :\n ans += 1\n break\n alist[0].remove(c)\n anslist = []\n i_roop += -1\n\nprint(ans)', 'n,m = map(int,input().split())\nk = 0\nalist = []\nwhile k < n :\n a = list(map(int,input().split()))\n alist.append(a)\n k += 1\n#\nif n == 1 :\n print(len(alist[0])-1)\nelse:\n for blist in alist :\n b = blist[0]\n blist.remove(b)\n#\n anslist = []\n ans = 0\n i_roop = len(alist[0])\n while i_roop >= 0 :\n if i_roop == 0 :\n break\n else:\n c = min(alist[0])\n for j in range(1,n) :\n if c in alist[j] :\n anslist.append("OK")\n if j == n-1 :\n if len(anslist) == n-1 :\n ans += 1\n else:\n if j == n-1 :\n if len(anslist) == n-1 :\n ans += 1\n break\n alist[0].remove(c)\n anslist = []\n i_roop += -1\n\nif n != 1 :\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s126451106', 's572216966'] | [3192.0, 3064.0] | [18.0, 17.0] | [619, 740] |
p03126 | u746154235 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import itertools\nN,M=map(int, input().split())\nres=[]\nfor _ in range(N):\n data=list(map(int, input().split()))\n K=data.pop(0)\n A=data\n res.append(A)\nprint(res)\nflatten_list = list(itertools.chain.from_iterable(res))\ncnt=0\nfor i in range(1, M+1):\n if flatten_list.count(i) == N:\n cnt +=1\nprint(cnt)\n', 'import itertools\nN,M=map(int, input().split())\nres=[]\nfor _ in range(N):\n data=list(map(int, input().split()))\n K=data.pop(0)\n A=data\n res.append(A)\nflatten_list = list(itertools.chain.from_iterable(res))\ncnt=0\nfor i in range(1, M+1):\n if flatten_list.count(i) == N:\n cnt +=1\nprint(cnt)\n'] | ['Wrong Answer', 'Accepted'] | ['s156046681', 's629482776'] | [3060.0, 3060.0] | [18.0, 18.0] | [306, 295] |
p03126 | u748311048 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M=map(int, input().split())\nList=[0]*M\n\nfor i in range(N):\n K=input().split()\n for k in range(K):\n List[int(k[K])-1]+=1\n \nprint(List.count(N))', 'N,M = map(int,input().split())\nlist_a = [0]*M\nfor i in range(N):\n k = input().split()\n for K in range(1,int(k[0])+1):\n list_a[int(k[K])-1] += 1\n \nprint(list_a.count(N))'] | ['Runtime Error', 'Accepted'] | ['s622148715', 's252499032'] | [3060.0, 3060.0] | [17.0, 17.0] | [152, 181] |
p03126 | u752898745 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nans=list(range(1,m+1))\nprint(ans)\nfor i in range(n):\n l=list(map(int,input().split()))[1:]\n ans=list(set(ans)&set(l))\nprint(len(ans))', 'n,m=map(int,input().split())\nans=list(range(1,m+1))\nfor i in range(n):\n l=list(map(int,input().split()))[1:]\n ans=list(set(ans)&set(l))\nprint(len(ans))'] | ['Wrong Answer', 'Accepted'] | ['s390478396', 's205207984'] | [3060.0, 3060.0] | [18.0, 18.0] | [168, 157] |
p03126 | u757030836 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m = map(int,input().split())\n\na = [[int(i) for i in input().split()] for _ in range(n)]\nk=[]\nans = 0\n\nfor i in range(n):\n k.append(a[i][0])\n\nfor j in range(1,m+1):\n x = 0\n for i in range(n):\n \n for w in range(1,(k[i]+1)):\n if a[i][w] == j:\n x +=1\n print(a[i][w])\n if x ==n:\n ans +=1\n\nprint(ans)', 'n,m = map(int,input().split())\nx =[]\nc = 0\nfor i in range(n):\n a = list(map(int,input().split()))\n a.pap(0)\n x.extend(a)\n \nfor j in range(1,m+1):\n if x.count(j) ==n:\n c +=1\n \nprint(c)', 'n,m = map(int,input().split())\nx = []\nc = 0\nfor i in range(n):\n a = list(map(int,input().split()))\n a.pop(0)\n x.extend(a)\n\nfor j in range(1,m+1):\n if x.count(j) == n:\n c += 1\n\nprint(c)\n\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s413216758', 's800002515', 's561088547'] | [3188.0, 2940.0, 3064.0] | [22.0, 17.0, 19.0] | [332, 194, 205] |
p03126 | u762420987 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M = map(int,input().split())\nlist_list = [list(map(int,input().split())) for i in range(N)]\n\ncount = 0\nfor i in range(1,M+1):\n for list in list_list:\n if i in list:\n continue\n else:\n break\n count += 1\n\n \nprint(count)\n ', 'N, M = map(int, input().split())\na = set(list(map(int, input().split()))[1:])\nfor i in range(N - 1):\n a &= set(list(map(int, input().split()))[1:])\nprint(len(a))\n'] | ['Wrong Answer', 'Accepted'] | ['s838203235', 's162234667'] | [2940.0, 2940.0] | [19.0, 17.0] | [244, 165] |
p03126 | u765556930 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import numpy as np\nn, m = map(int, input().split())\nA = []\nfor _ in range(n):\n __ = input().split()\n A.append(np.array(__, dtype=int))\nans = []\nfor i in range(m):\n ans.append(i+1)\n_ans = ans.copy()\nfor a in A:\n for i in range(len(ans)):\n if not ans[i] in a[1:]:\n _ans.remove(ans[i])\nprint(len(_ans))', 'import numpy as np\nn, m = map(int, input().split())\nA = []\nfor _ in range(n):\n __ = input().split()\n A.append(np.array(__, dtype=int))\nans = []\nfor i in range(m):\n ans.append(i+1)\n_ans = ans.copy()\nfor a in A:\n for i in range(len(ans)):\n if not ans[i] in a[1:]:\n _ans.remove(ans[i])\n ans = _ans.copy()\n \nprint(len(_ans))'] | ['Runtime Error', 'Accepted'] | ['s765654771', 's651944908'] | [12488.0, 12488.0] | [152.0, 152.0] | [311, 334] |
p03126 | u767995501 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m,x=map(int,input().split())\ns=sum(int(i)<x for i in input().split())\nprint(min(s,m-s))\n', 'n, m = map(int, input().split())\n\nl = []\nfor i in range(n):\n a = [int(x) for x in input().split()]\n for j in range(1, a[0] + 1):\n l.append(a[j])\n\nans = 0\nfor i in range(m + 1):\n if l.count(i) == n:\n ans += 1\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s807931429', 's503433523'] | [2940.0, 3060.0] | [17.0, 18.0] | [90, 228] |
p03126 | u770077083 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = map(int, input().split())\nflag = []\nfor _ in range(m): flag.append(True)\nfor _ in range(n):\n line = list(map(int, input()))\n for i in range(line[0]): flag[line[i+1]] = False\ncount = 0\nfor j in range(m):\n if(flag[j]): count += 1\nprint(count)', 'n, m = map(int, input().split())\nflag = []\nfor _ in range(m): flag.append(0)\nfor _ in range(n):\n line = list(map(int, input().split()))\n for i in range(line[0]): flag[line[i+1]-1] += 1\ncount = 0\nfor j in range(m):\n if(flag[j] == n): count += 1\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s362184435', 's126699948'] | [3064.0, 3064.0] | [19.0, 18.0] | [256, 265] |
p03126 | u771167374 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['from collections import deque\nn, m = map(int, input().split())\na = [0]*m\nfor _ in range(n):\n A = deque(map(int, input().split()))\n k = A.popleft()\n if i == 0:\n S = set(A)\n else:\n S = S & set(A)\nprint(len(S))\n', 'from collections import deque\nn, m = map(int, input().split())\na = [0]*m\nfor _ in range(n):\n A = deque(map(int, input().split()))\n k = A.popleft()\n if i == 0:\n S = set(A)\n else:\n S = S & set(A)\n \nprint(len(S))\n', 'from collections import deque\nn, m = map(int, input().split())\na = [0]*m\nfor _ in range(n):\n A = deque(map(int, input().split()))\n k = A.popleft()\n if _ == 0:\n S = set(A)\n else:\n S = S & set(A)\nprint(len(S))\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s067308934', 's311716246', 's245844059'] | [3316.0, 3444.0, 3316.0] | [21.0, 21.0, 21.0] | [234, 236, 235] |
p03126 | u771532493 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M=(int(i) for i in input().split())\nL=[]\nfor i in range(N):\n L.append([int(i) for i in input().split()])\ns=set(L[0][1:L[0][0]])\nfor i in range(N):\n s=s&set(L[i][1:L[i][0]])\nprint(len(list(s))\n ', 'N,M=(int(i) for i in input().split())\nS=set(int(i+1) for i in range(M))\n\nfor i in range(N):\n L=[int(i) for i in input().split()]\n S=S&set(L[1:])\nprint(len(list(S)))'] | ['Runtime Error', 'Accepted'] | ['s994193682', 's485752013'] | [2940.0, 3060.0] | [17.0, 18.0] | [199, 170] |
p03126 | u778814286 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nK = [0] * N\nA = [list(map(int, input().split())) for i in range(N)]\ncount = 0\nfor i in range(1, M+1, 1): \n likecount = 0\n for j in range(N): \n print(A[j][0])\n for k in range(A[j][0]): \n if A[j][k] == i:\n likecount += 1\n if likecount == N: \n count += 1\nprint(count)\n', 'N, M = map(int, input().split())\nlikeset = set(range(1, M+1)) \nfor _ in range(N):\n a, *b = map(int, input().split()) \n likeset &= set(b) \nprint(len(likeset))\n'] | ['Wrong Answer', 'Accepted'] | ['s782262721', 's873832408'] | [3188.0, 2940.0] | [22.0, 17.0] | [354, 164] |
p03126 | u779728630 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\nt = [0 for i in range(M+1)]\nfor i in range(N):\n A = map(int, input().split())\n for j in range(1, A[0]+1):\n t[ A[j] ] += 1\nans = 0\nfor i in t:\n if i == N:\n ans += 1\nprint(ans)', 'N, M = map(int, input().split())\nt = [0 for i in range(M+1)]\nfor i in range(N):\n A = list(map(int, input().split()))\n for j in range(1, A[0]+1):\n t[ A[j] ] += 1\nans = 0\nfor i in t:\n if i == N:\n ans += 1\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s885991398', 's563348604'] | [8988.0, 9188.0] | [29.0, 28.0] | [216, 223] |
p03126 | u780475861 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['from functools import reduce\nfrom math import log\nn, m = map(int, input().split())\nf1 = lambda x, y: 1 << x | 1 << y\nf2 = lambda x, y: x & y\nlst = []\nfor i in range(n):\n tmplst = [int(i) for i in input().split()]\n tmp = reduce(f1, tmplst[1:])\n lst.append(tmp)\nret = reduce(f2, lst)\nif ret:\n print(int(log(ret, 2)))\nelse:\n print(0)\n ', 'n, m = map(int, input().split())\nlst = []\nfor i in range(n):\n tmplst = [int(i) for i in input().split()]\n tmp = 0\n for item in tmplst[1:]:\n tmp |= 1 << item\n lst.append(tmp)\nret = lst[0]\nfor item in lst[1:]:\n ret &= item\nif ret:\n s = sum(map(int, bin(ret)[2:]))\n print(s)\nelse:\n print(0)\n '] | ['Runtime Error', 'Accepted'] | ['s701694139', 's575319884'] | [38628.0, 3060.0] | [34.0, 17.0] | [338, 301] |
p03126 | u784169501 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ["N, M = [int(s) for s in input().split(' ')]\nhypo = []\n\nfor _ in range(N):\n hypo.append([int(s) for s in input().split(' ')])\n\nlike_counts = [0] * M\nfor h in hypo:\n h_ = list(set(h))\n for i in h_:\n like_counts[i - 1] += 1\n\ncounts = 0\nfor i in like_counts:\n if i == N:\n counts += 1\nprint(counts)\n", "N, M = [int(s) for s in input().split(' ')]\nhypo = []\n\nfor _ in range(N):\n hypo.append([int(s) for s in input().split(' ')][1:])\n\nlike_counts = [0] * M\nfor h in hypo:\n h_ = list(set(h))\n for i in h_:\n like_counts[i - 1] += 1\n\ncounts = 0\nfor i in like_counts:\n if i == N:\n counts += 1\nprint(counts)\n"] | ['Wrong Answer', 'Accepted'] | ['s072920565', 's184751586'] | [3060.0, 3060.0] | [18.0, 18.0] | [304, 308] |
p03126 | u787562674 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int, input().split())\n\ninputs = [[i for i in input().split()] for _ in range(N)]\n\nans = set(inputs[0])\nfor item in inputs:\n ans &= set(inputs[1:])\n\nprint(len(ans))\n', 'N, M = map(int, input().split())\n\ninputs = [[i for i in input().split()] for _ in range(N)]\n\nans = set(inputs[0])\nfor item in inputs:\n ans &= set(item[1:])\n\nprint(len(ans))\n'] | ['Runtime Error', 'Accepted'] | ['s588663845', 's177791505'] | [3060.0, 3060.0] | [23.0, 17.0] | [178, 176] |
p03126 | u794910686 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n,m=map(int,input().split())\nfood=list(range(1,m+1))\nfor i in range(n):\n k,*a=map(int,input().split())\n food &= set(a)\nprint(len(food))', 'n,m=map(int,input().split())\nfood=set(range(1,m+1))\nfor i in range(n):\n k,*a=map(int,input().split())\n food &= set(a)\nprint(len(food))\n'] | ['Runtime Error', 'Accepted'] | ['s019839309', 's753823444'] | [3064.0, 3064.0] | [18.0, 17.0] | [141, 141] |
p03126 | u798316285 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N,M=map(int,input().split())\nSet=set(range(1,M+1))\nfor i in range(N):\n Set=Set & set(map(int,input().split()))\nprint(len(Set))', 'N,M=map(int,input().split())\nSet=set(range(1,M+1))\nfor i in range(N):\n Set=Set and set(map(int,input().split()))\nprint(len(Set))', 'N,M=map(int,input().split())\nSet=set(range(1,M+1))\nfor i in range(N):\n Set=Set & set(list(map(int,input().split()))[1:])\nprint(len(Set))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s009087684', 's659442583', 's004676930'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [127, 129, 137] |
p03126 | u803944700 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ["N = int(input())\nvectors = [input().split() for i in range(N)]\n\nvalue = 0\nconverter = {\n 'JPY' : 1,\n 'BTC' : 380000\n}\nfor v in vectors:\n x, u = v\n value += float(x) * converter.get(u)\n\nprint(value)", 'N, M = map(int, input().split())\nvectors = [list(map(int, input().split())) for i in range(N)]\n\nsumamry = [0] * M\nfor vec in vectors:\n ans = vec[1:]\n for a in ans:\n sumamry[a-1] += 1\n\nret = 0\nfor s in sumamry:\n if s == N:\n ret += 1\n\nprint(ret)'] | ['Runtime Error', 'Accepted'] | ['s662370087', 's650996548'] | [3060.0, 3064.0] | [17.0, 19.0] | [209, 266] |
p03126 | u804085889 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N = list(map(int, input().split()))\narray = list(map(int, input().split()))\narray.remove(array[0])\ndainyu = []\nfor i in range(0, N[0]-1):\n data = list(map(int, input().split()))\n dainyu = []\n for loop in range(1, data[0]-1):\n if (array.count(data[loop]) != 0) :\n dainyu.append(data[loop])\n array = dainyu\nprint(len(array))', 'N = list(map(int, input().split()))\narray = list(map(int, input().split()))\narray.remove(array[0])\ndainyu = []\nfor i in range(0, N[0]-1):\n data = list(map(int, input().split()))\n dainyu = []\n for loop in range(1, data[0]+1):\n if (array.count(data[loop]) != 0) :\n dainyu.append(data[loop])\n array = dainyu\nprint(len(array))'] | ['Wrong Answer', 'Accepted'] | ['s665345796', 's536915039'] | [3064.0, 3064.0] | [17.0, 18.0] | [352, 352] |
p03126 | u805375187 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['import numpy as np\nN, M = map(int, input().split())\n\nA = np.zeros((N,M))\nfor i in range(N):\n a = list(map(int, input().split()))\n a = a[1:]\n A[i, 0:len(a)] = a\n\nfor i in range(N):\n a = A[i]\n a = a[(a != 0) & (a < M)]\n if i == 0:\n s = set(list(a))\n else:\n _s = set(list(a))\n s &= _s\n\nprint(len(s))', 'N, M = map(int, input().split())\nA = []\nfor i in range(N):\n A.append(list(map(int, input().split())))\n \ns = set(list(A[0]))\nfor i in range(N):\n _s = set(A[i])\n s &= _s\n\nprint(len(s))', 'N, M = map(int, input().split())\n\nA = []\nfor i in range(N):\n A.append(list(map(int, input().split())))\n\ns = set(A[0])\nfor i in range(1,N):\n _s = set(A[i])\n s &= _s\n \nans = len(s)-1\nprint(ans-1 if ans > 0 else 0)', 'import numpy as np\nN, M = map(int, input().split())\n\nA = np.zeros((N,M))\nfor i in range(N):\n a = list(map(int, input().split()))\n a = a[1:]\n A[i, 0:len(a)] = a\n\nfor i in range(N):\n a = A[i]\n a = a[(a != 0) & (a < M)]\n print(a)\n if i == 1:\n s = set(list(a))\n else:\n _s = set(list(a))\n s &= _s\n\nprint(len(s))', 'import numpy as np\nN, M = map(int, input().split())\n\nA = np.zeros((N,M))\nfor i in range(N):\n a = list(map(int, input().split()))\n A[i, 0:len(a)] = a\n\nA = A[(A != 0) & (A < M)]\nlen(np.unique(A))', 'import numpy as np\nN, M = map(int, input().split())\n\nA = np.zeros((N,M))\nfor i in range(N):\n a = list(map(int, input().split()))\n a = a[1:]\n A[i, 0:len(a)] = a\n\nfor i in range(N):\n a = A[i]\n a = a[(a != 0) & (a < M)]\n if i == 1:\n s = set(list(a))\n else:\n _s = set(list(a))\n s &= _s\n\nprint(len(s))', 'import numpy as np\nN, M = map(int, input().split())\n\nA = np.zeros((N,M))\nfor i in range(N):\n a = list(map(int, input().split()))\n a = a[1:]\n A[i, 0:len(a)] = a\n\nfor i in range(N):\n a = A[i]\n a = a[(a != 0) & (a <= M)]\n if i == 0:\n s = set(list(a))\n else:\n _s = set(list(a))\n s &= _s\n\nprint(len(s))'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s128116680', 's235733084', 's297192589', 's346409147', 's455541771', 's785444308', 's643331223'] | [27200.0, 8940.0, 9080.0, 27240.0, 27228.0, 27060.0, 26960.0] | [116.0, 26.0, 30.0, 118.0, 123.0, 116.0, 119.0] | [334, 194, 223, 347, 199, 334, 339] |
p03126 | u811000506 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['N, M = map(int,input().split())\nans = list(range(M))\nfor j in range(N):\n k = list(map(int,input().split()))\n del k[0]\n print(k)\n ans += k\n ans_2 = [a for a in set(ans) if ans.count(a) > N]\nif N == 1:\n print(len(k))\nelse:\n print(len(ans_2))', 'N, M = map(int,input().split())\nif N == 1:\n alpha = list(map(int,input().split()))\n print(len(alpha)-1)\n exit()\nli = [list(map(int,input().split())) for i in range(N)]\nfor i in range(0,N,1):\n del li[i][0]\nfor i in range(1,N,1):\n if i == 1:\n ans = set(li[i-1]) & set(li[i])\n else:\n ans = set(ans) & set(li[i])\nprint(len(ans))\n'] | ['Wrong Answer', 'Accepted'] | ['s041138136', 's637306124'] | [3060.0, 3064.0] | [24.0, 18.0] | [246, 357] |
p03126 | u811576279 | 2,000 | 1,048,576 | Katsusando loves omelette rice. Besides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone. To prove that hypothesis, he conducted a survey on M kinds of foods and asked N people whether they like these foods or not. The i-th person answered that he/she only likes the A_{i1}-th, A_{i2}-th, ..., A_{iK_i}-th food. Find the number of the foods liked by all the N people. | ['n, m = map(int,input().split())\n\nli = []\nfor i in range(n):\n x = map(int,input().split())\n li.append(list(x)[1:])\n# print(li)\n\n\nsumnum = 0 \nfor i in range(1, m+1):\n num = 0 \n for j in range(n):\n if i not in li[j]:\n num=0\n break\n num = 1 \n\n if num == 1:\n sumnum+=1\nprint(sumnum)\n~ \n~ \n~ ', 'n, m = map(int,input().split())\n\nli = []\nfor i in range(n):\n x = map(int,input().split())\n li.append(list(x)[1:])\n# print(li)\n\n\nsumnum = 0 \nfor i in range(1, m+1):\n num = 0 \n for j in range(n):\n if i not in li[j]:\n num=0\n break\n num = 1 \n\n if num == 1:\n sumnum+=1\nprint(sumnum)'] | ['Runtime Error', 'Accepted'] | ['s711006149', 's854520676'] | [3060.0, 3064.0] | [17.0, 17.0] | [773, 338] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.