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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02773 | u771167374 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nn = int(input())\nls = [input() for i in range(n)]\ndict = Counter(ls)\nprint(max(dict))', 'from collections import Counter\nn = int(input())\nl = [input() for i in range(n)]\nls = Counter(l)\nmost_num = ls.most_common()[0][1]\nkeymost = [i for i, j in ls.items() if j == most_num]\nke... | ['Wrong Answer', 'Accepted'] | ['s482588854', 's994190574'] | [35572.0, 45040.0] | [307.0, 664.0] | [117, 230] |
p02773 | u773440446 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\nl = [input() for i in range(n)]\nan = list(set(l))\nalm = []\nfor i in range(len(an)):\n alm.append(l.count(an[i]))\n \nans = max(alm)\n\nfor i in range(len(an)):\n if alm[i] == ans:\n print(an[i])', 'from collections import Counter\nn = int(input())\ns = [input() for i in range(n)]\... | ['Wrong Answer', 'Accepted'] | ['s491908824', 's165723210'] | [35676.0, 38880.0] | [2206.0, 427.0] | [220, 180] |
p02773 | u774539708 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\nD={}\nfor i in range(n):\n s=input()\n if s in D:\n D[s]+=1\n else:\n D[s]=1\nM=max(D.values())\nfor d in D:\n if D[d]==M:\n print(d)', 'n=int(input())\nD={}\nfor i in range(n):\n s=input()\n if s in D:\n D[s]+=1\n else:\n D[s]=1\nM=max(D.values(... | ['Wrong Answer', 'Accepted'] | ['s169693124', 's758455012'] | [32096.0, 34008.0] | [465.0, 655.0] | [171, 212] |
p02773 | u777394984 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['def resolve():\n import collections\n n = int(input())\n c = list(collections.Counter([int(input()) for _ in range(n)]).most_common())\n s = []\n m = c[0][0]\n for i in c:\n if c !=m:\n break\n s.append(i[0])\n s.sort()\n print("\\n".join(s))\nresolve()', 'def resolve(... | ['Runtime Error', 'Accepted'] | ['s702419552', 's789233586'] | [3316.0, 43556.0] | [21.0, 573.0] | [289, 287] |
p02773 | u780475861 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nimport sys\nn = int(sys.stdin.readline())\nsn = sys.stdin.read().split()\nc = Counter(sn)\nc = sorted(c.items(), key=lambda x: (x[1], x[0]))\nnum = c[0][1]\nfor i, j in c:\n if j == num:\n print(i)\n else:\n quit()', "from collections import Counter\nimport sys\nn = int(sys.st... | ['Wrong Answer', 'Accepted'] | ['s642256175', 's396566181'] | [60532.0, 38476.0] | [702.0, 283.0] | [244, 217] |
p02773 | u780565479 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\nd = {}\nfor i in range(n):\n s = input()\n d[s] = d[s]+1 if (s in d) else 1\nd_sorted = sorted(d.items(), key=lambda x:x[1], reverse=True)\nm = d_sorted[0][1]\nfor i in range(n):\n if d_sorted[i][1]!=m:\n break\n print(d_sorted[i][0])', "n = int(input())\nd = {}\nfor i in range(n)... | ['Runtime Error', 'Accepted'] | ['s820617479', 's177123164'] | [44892.0, 48220.0] | [565.0, 667.0] | [261, 294] |
p02773 | u781758937 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import numpy as np\n\nN = int(input())\n\nS = []\ncnt = []\nfor i in range(N):\n s = input()\n if s in S:\n cnt[S.index(s)] += 1\n else:\n S.append(s)\n cnt.append(1)\n\ncnt = np.array(cnt)\nS = np.array(S)\n\nans = S[cnt==cnt.max()]\nans.sort()\n\nprint(ans)\n\nfor s in ans:\n print(s)', 'N = int(input(... | ['Wrong Answer', 'Accepted'] | ['s441588093', 's021583557'] | [15304.0, 44124.0] | [2108.0, 845.0] | [277, 189] |
p02773 | u782009499 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\ns = [str(input()) for i in range(n)]\nd = {}\nfor name in s:\n if name in d.keys():\n d[name] = d[name] + 1\n else:\n d.setdefault(name, 1)\nmax_k_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]\nfor i in max_k_list:\n print(i)', 'n = int(input())\ns = [str(inpu... | ['Wrong Answer', 'Accepted'] | ['s401678449', 's545613521'] | [35216.0, 22180.0] | [2105.0, 669.0] | [273, 484] |
p02773 | u789840108 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\ns = {}\n\nfor i in range(n):\n ss = input()\n\n if ss in s:\n s[ss] += 1\n else:\n s[ss] = 1\n\ns2 = sorted(s.items(), key=lambda x:x[1])\n\ns2.reverse()\n\nmax_value = s2[0][1]\nret = []\n\nfor sss in s2:\n if sss[1] == max_value:\n ret.append(sss[0])\n else:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s446413892', 's482592591', 's215518492'] | [51932.0, 51676.0, 47324.0] | [692.0, 650.0, 741.0] | [339, 354, 355] |
p02773 | u795928154 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nS = []\nmaxnum = 0\nmaxyouso = []\nfor kai in range (N):\n S.append(input())\nfor num in S:\n if S.count(num) > maxnum:\n maxnum = S.count(num)\nfor num in S:\n if S.count(num) == maxnum:\n maxyouso.append(num)\nmaxyouso = (set(maxyouso))\nfor j in maxyouso:\n print(j)', 'N... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s263408670', 's786775841', 's971790643', 's214498025'] | [18840.0, 39424.0, 18840.0, 35220.0] | [2104.0, 784.0, 2105.0, 665.0] | [299, 456, 314, 440] |
p02773 | u796842765 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nS = [input() for _ in range(N)]\nimport collections\nc = collections.Counter(S)\nA = sorted(c.items(), key=lambda x: x[1], reverse=True)\ncount = 0\nfor a, b in A:\n if b >= count:\n print(a)\n count = b\n else:\n exit()', 'N = int(input())\nS = [input() for _ in range(N)]... | ['Wrong Answer', 'Accepted'] | ['s898131362', 's010007478'] | [46900.0, 49224.0] | [552.0, 720.0] | [254, 303] |
p02773 | u797550216 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\n\nwords = [input() for i in range(n)]\n\ndic = {}\n\nfor word in words:\n if not word in dic:\n dic[word] = 1\n \n else:\n dic[word] += 1\n\nans = [k for k, v in dic.items() if v == max(dic.values())]\n\nfor i in ans:\n print(i)', 'n = int(input())\ndic = {}\n\nfor word in ... | ['Wrong Answer', 'Accepted'] | ['s422500966', 's581769500'] | [35220.0, 32096.0] | [2105.0, 656.0] | [256, 265] |
p02773 | u798260206 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nN=int(input())\nS=[input() for i in range(N)]\ns=Counter(S)\nm=max(s.values())\ns=sorted(s.items() ,key=lambda s:s[0])\n\nprint(s)\n', 'from collections import Counter\nN=int(input())\nS=[input() for i in range(N)]\ns=Counter(S)\nm=max(s.values())\ns=sorted(s.items() ,key=lambda s:s[0... | ['Wrong Answer', 'Accepted'] | ['s660975112', 's608635711'] | [46572.0, 46620.0] | [699.0, 715.0] | [157, 195] |
p02773 | u799215419 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['dct = {}\nfor i in range(N):\n S = input()\n if dct.get(S) == None:\n dct[S] = 1\n else:\n dct[S] += 1\nsortedDct = sorted(dct.items(), key=lambda x: -x[1])\nL = []\nmaxNum = 0\nfor k, v in sortedDct:\n if (maxNum <= v):\n L.append(k)\n maxNum = v\nL.sort()\nfor l in L:\n pr... | ['Runtime Error', 'Accepted'] | ['s675791771', 's633697588'] | [3064.0, 45784.0] | [17.0, 748.0] | [308, 325] |
p02773 | u801009312 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['# coding: utf-8\n# Your code here!\n\nimport collections\na = int(input())\nli1 = []\n \nfor i in range(a):\n li1.append(str(input()))\n \nc = collections.Counter(li1)\n\nprint(c)\n \nsorted_items = sorted(\n c.most_common(),\n key = lambda x:(x[1],x[0]), reverse=True)\n \nprint(sorted_items)\n \nkey, value = z... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s472145187', 's522043267', 's704648446'] | [75076.0, 75104.0, 62448.0] | [1412.0, 1502.0, 1306.0] | [514, 434, 481] |
p02773 | u801049006 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["def main():\n N = int(input())\n\n count = dict()\n for i in range(N):\n s = input()\n try:\n count[s] += 1\n except:\n count[s] = 1\n \n sort_ = sorted(count.items(), key=lambda x:x[0], reverse=True)\n\n max_value = sort_[0][1]\n item = []\n for key,... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s510298758', 's746885292', 's730114795'] | [46940.0, 27880.0, 45784.0] | [964.0, 2105.0, 868.0] | [540, 393, 514] |
p02773 | u805552010 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\n\nn = int(input())\ns = [input() for _ in range(n)]\n\nc = collections.Counter(s)\nc2 = c.most_common()\na = c2[0][1]\nans = []\n\nfor i in range(len(c)):\n ans.append(c2[i][0])\n\nans.sort()\nprint(*ans,sep="\\n")\n', 'from collections import Counter\n\nn = int(input())\ns = [input() for _ in ... | ['Wrong Answer', 'Accepted'] | ['s874894483', 's177637667'] | [50304.0, 50164.0] | [710.0, 669.0] | [223, 248] |
p02773 | u808799019 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N, strings, answers = int(input()), [], []\nfor x in range(N):\n string = input()\n strings.append(string)\nmax_char = strings.count(max(strings, key=strings.count))\nfor x in strings:\n if strings.count(x) == max_char:\n answers.append(x)\nfor x in set(answers):\n print(x)', 'from collections impo... | ['Wrong Answer', 'Accepted'] | ['s035890816', 's498851143'] | [17056.0, 45268.0] | [2105.0, 1167.0] | [284, 389] |
p02773 | u810066979 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nn = int(input())\ns = [input() for i in range(n)]\nc = collections.Counter(s)\nnum = c.most_common()[0][1]\nlist=[]\nfor i in range(len(c)):\n\tif num == c.most_common()[i][1]:\n\t\tprint(c.most_common()[i][0])\n\t\t#list.append(c.most_common()[i][0])', ' int(input())\nd = dict()\n \nfor i in rang... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s356248953', 's529615218', 's689131637', 's511206977'] | [45040.0, 2940.0, 45324.0, 32096.0] | [2106.0, 17.0, 2106.0, 637.0] | [257, 273, 283, 273] |
p02773 | u812867074 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['l = [input() for i in range(n)]\nl.sort()\ni = 0\nmax = 1\ncount = 1\nans = []\n\nwhile i < n-1:\n if l[i] == l[i+1]:\n count += 1\n i += 1\n if i == n-1 and count >= max:\n ans.append(l[n-1])\n\n else:\n if count >= max:\n max = count\n ans.append(l[i])\n count = 1\n i += 1\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s351706669', 's754756604', 's090030573'] | [3064.0, 3064.0, 39112.0] | [19.0, 18.0, 775.0] | [402, 347, 415] |
p02773 | u815754241 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['inpvals = []\nlopvals = []\noutvals = []\n\nmax_loop = int(input())\nidx_loop = 0\nwhile idx_loop < max_loop :\n inpvals.append(input())\n idx_loop = idx_loop+1\n\nmax_cnt = 0\nlopvals = set(inpvals)\nfor inpval in inpvals :\n cnt = inpvals.count(inpval)\n\n if max_cnt <= cnt :\n if max_cnt != cnt :\n out... | ['Wrong Answer', 'Accepted'] | ['s431453276', 's320049411'] | [29076.0, 45268.0] | [2108.0, 893.0] | [416, 406] |
p02773 | u816070625 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nimport itertools\n\nN=int(input())\nA=[]\n\n\nfor i in range(N):\n A.append(input())\n\ncounter = collections.Counter(A)\n\nmode_v = counter.most_common()[0][-1]\n\nit = itertools.takewhile(\n lambda kv: kv[-1] == mode_v, counter.most_common()\n)\n\nfor k,v in it:\n print(k)\n', 'import colle... | ['Wrong Answer', 'Accepted'] | ['s145700935', 's627115094'] | [46888.0, 45080.0] | [606.0, 882.0] | [282, 338] |
p02773 | u816637025 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\ns = [input() for _ in range(n)]\nu = set(s)\n\nw = []\nm = 0\nfor x in u:\n n = sum([1 for i in s if i == x])\n if n > m:\n m = n\n w.clear()\n w.append(x)\n elif n == m:\n w.append(x)\n\nprint(sorted(w))', 'n = int(input())\ns = [input() for _ in range(n)]\n\nd ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s075944276', 's885846932', 's923762858'] | [29076.0, 53516.0, 53520.0] | [2108.0, 616.0, 666.0] | [244, 220, 236] |
p02773 | u818349438 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nn = int(input())\ns = []\nfor i in range(n):\n s.append(input())\ns = Counter(s)\nprint(s.most_common()[0][0])\ni = 1\np = []\nwhile i < len(s.most_common()) and s.most_common()[i][1] == s.most_common()[0][1] :\n p.append(str(s.most_common()[i][0]))\n i+=1\np = sorted(p)\nfo... | ['Wrong Answer', 'Accepted'] | ['s786944248', 's220438211'] | [43476.0, 33112.0] | [2106.0, 753.0] | [342, 337] |
p02773 | u820284192 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nN = int(input())\nList=[input() for i in range(N)]\n\nc = collections.Counter(List)\nc_sorted = sorted(c.items(), key=lambda x:x[1],reverse=True)\n\nmaxCount = c_sorted[0][1]\nkeys = [k for k, v in c.items() if v ==maxCount]\nfor s in keys:\n print(s)', 'import collections\nN = int(input())\nLi... | ['Wrong Answer', 'Accepted'] | ['s516552558', 's310746803'] | [47020.0, 47632.0] | [589.0, 723.0] | [264, 278] |
p02773 | u821775079 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\ns = [input() for i in range(n)]\nd = {}\nfor i in s:\n if i in d.keys():\n d[i]=d[i]+1\n else:\n d[i]=1\nd_sorted = sorted(d.items(), key=lambda x:x[1])\nd_name = [x[0] for x in d_sorted if x[1] == d_sorted[-1][0]]\nd_name.sort()\nprint("\\n".join(d_name))', 'n = int(input())\ns ... | ['Wrong Answer', 'Accepted'] | ['s976564431', 's779535525'] | [44792.0, 49936.0] | [455.0, 600.0] | [282, 282] |
p02773 | u823885866 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import sys\nn = int(sys.stdin.readline())\nli = []\nfor _ in range(n):\n li.append(sys.stdin.readline().strip())\nli2 = list(set(li)).sort(reverse = True)\ncnt_box = []\nfor i in li2:\n cnt_box.append(li.count(i))\nm = max(cnt_box)\ni = 0\nwhile i < len(cnt_box):\n if cnt_box[i] == m:\n print(li2[i])\n i += 1\... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s506606193', 's552975729', 's040723641'] | [29076.0, 29076.0, 44480.0] | [315.0, 2104.0, 512.0] | [304, 276, 402] |
p02773 | u825378567 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N=int(input())\nans={}\ncnt=0\nfor i in range():\n t=input()\n if not t in ans.keys():\n ans[i]==1\n else:\n ans[i]+=1\n if cnt<ans[i]:\n cnt=ans[i]\ntmp =[]\nfor i in ans.keys():\n if ans[i] == cnt:\n tmp.append(i)\nfor i in sort(tmp):\n print(i)\n', 'N=int(input())\nans={}\ncnt=0\nfor i in range(... | ['Runtime Error', 'Accepted'] | ['s949957697', 's020164409'] | [3060.0, 32096.0] | [17.0, 692.0] | [251, 256] |
p02773 | u829249049 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N=int(input())\nlistS=[]\nfor i in range(N):\n S=input()\n listS+=[S]\nlistS.sort()\ncounter=[]\ncount=1\nfor i in range(N-1):\n if listS[i]==listS[i+1]:\n count+=1\n else:\n counter+=[count]\n count=1\n \ncounter+=[count] \nMAX=max(counter)\ncount=1\n\nfor i in range(N-1):\n if listS[i]==listS[i+... | ['Wrong Answer', 'Accepted'] | ['s206611138', 's049997872'] | [20680.0, 43476.0] | [761.0, 797.0] | [411, 300] |
p02773 | u829416877 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nd = {}\nfor _ in range(N):\n S = input()\n if S in d:\n d[S] += 1\n else:\n \u3000d[S] = 1\nm = max(d.values())\nfor s in sorted(k for k in d if d[k] == m):\n print(s)', 'N = int(input())\nd = {}\nfor _ in range(N):\n S = input()\n if S in d:\n d[S] += 1\n else:\n d[S] = 1\nm = max... | ['Runtime Error', 'Accepted'] | ['s185256227', 's613308291'] | [8956.0, 35416.0] | [27.0, 435.0] | [181, 179] |
p02773 | u835322333 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nN = int(input())\nS = [input() for i in range(N)]\n\n\nc = collections.Counter(S)\nvalue,count = zip(*c.most_common(len(c)))\n\nif len(set(count)) == 1:\n s = sorted(value)\n for i in s:\n print(i)\nelse:\n for i in value:\n print(i)\n exit()', 'import collections\nN ... | ['Wrong Answer', 'Accepted'] | ['s850972702', 's587114526'] | [59368.0, 59508.0] | [758.0, 799.0] | [296, 383] |
p02773 | u838786721 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\ns = []\nfor i in range(n):\n s.append(input())\n\nimport collections\n\nc = collections.Counter(s)\nl = [kv[0] for kv in c.items() if kv[1] == max(c.values())]\n\nfor i in l:\n print(i)', 'n = int(input())\ns = {}\nm = 1\nfor i in range(n):\n p = input()\n if p in s:\n s[p] += 1\n if m < s... | ['Wrong Answer', 'Accepted'] | ['s099911783', 's892655585'] | [35476.0, 32096.0] | [2105.0, 686.0] | [194, 223] |
p02773 | u840310460 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['ans = {}\nfor i in S:\n if i in ans:\n ans[i] += 1\n else:\n ans[i] = 1\n\nmax_v = max(ans.values()) \nANS = []\nfor key, value in ans.items():\n if ans[key] == max_v:\n ANS.append(key)\n\nfor i in sorted(ANS):\n print(i)', 'N = int(input())\nS = [input() for i in range(N)]\n\n... | ['Runtime Error', 'Accepted'] | ['s122708325', 's990709179'] | [3060.0, 35216.0] | [17.0, 710.0] | [247, 297] |
p02773 | u840570107 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\nlis = []\nlis2 = {}\nlis3 = []\nfor _ in range(n):\n lis.append(input())\n\nfor w in lis:\n if w not in lis2.keys():\n lis2[w] = 1\n else:\n lis2[w] += 1\n\nma = max(lis2.values())\n\nfor k, v in lis2.items():\n if v == ma:\n lis3.append(k)\n\nfor a in lis3:\n print(a)', 'n = int(input... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s097084471', 's214164692', 's480133489', 's116406815'] | [35220.0, 46736.0, 46732.0, 35216.0] | [511.0, 598.0, 612.0, 676.0] | [281, 431, 431, 294] |
p02773 | u840958781 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\nS=[]\nans=0\nimport collections\nfor i in range(n):\n s=input()\n S.append(s)\nS=sorted(S)\nc=collections.Counter(S)\nANS=[]\nfor i in range(n-1):\n if (S[i]!=S[i+1] and ans<c[S[i]]) or i==n-2:\n ans=c[S[i]]\n ANS.append(ans)\ninko=""\nans=max(ANS)\nfor i in range(n):\n if c[... | ['Wrong Answer', 'Accepted'] | ['s404721521', 's750441580'] | [38504.0, 38504.0] | [801.0, 851.0] | [389, 407] |
p02773 | u840974625 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\nList = [input() for i in range(n)]\n\nc = {}\nres = []\n\nfor i in range(n):\n if List[i] in c.keys():\n c[List[i]] += 1\n else:\n c[List[i]] = 1\n\nac = c.most_common() \n \nres.append(ac[0][0])\nfor i in range(1, leng):\n if ac[i][1] >= ac[i-1][1]:\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s222403836', 's511061199', 's578114433', 's139147542'] | [35220.0, 35572.0, 35572.0, 35572.0] | [355.0, 310.0, 634.0, 727.0] | [525, 264, 269, 394] |
p02773 | u849229491 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nn = int(input())\nS = []\nfor _ in range(n):\n s = input()\n S.append(s)\ncnt = Counter(S)\nl = max(cnt.values())\n\nans = []\nfor k,v in cnt.items():\n if v == l:\n ans.append(k)\nprint(ans)\nans.sort()\nfor i in ans:\n print(i)', 'from collections import Counter\nn = int(... | ['Wrong Answer', 'Accepted'] | ['s190831886', 's410964182'] | [39536.0, 35572.0] | [676.0, 673.0] | [257, 247] |
p02773 | u849756457 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\n\nd = {}\nfor _ in range(N):\n s = input()\n if s in d:\n d[s] += 1\n else:\n d[s] = 1\n \nd = {k: v for k, v in sorted(d.items(), key=lambda item: item[1], reverse=True)}\n\nmax_count = -1\nfor k, v in d.items():\n if max_count < v:\n max_count = v\n if v != max_count:\n break\n... | ['Wrong Answer', 'Accepted'] | ['s157394160', 's202605763'] | [66400.0, 66360.0] | [429.0, 449.0] | [310, 364] |
p02773 | u851035514 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nS = []\nfor i in range(N):\n S.append(input())\nS.sort()\nS.append("A")\nprint(S)\nB = []\nM = 1\nT = 1\nfor i in range(N):\n if S[i] == S[i+1]:\n T += 1\n elif T < M:\n T = 1\n elif T == M:\n T = 1\n B.append(S[i])\n else:\n M = T\n T = 1\n ... | ['Runtime Error', 'Accepted'] | ['s748439182', 's883353200'] | [25024.0, 20680.0] | [546.0, 658.0] | [349, 345] |
p02773 | u851319680 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import numpy as np\n\nN = int(input())\na = input().split()\n\na = np.array(a)\n\nunique_elements, counts_elements = np.unique(a, return_counts=True)\nelements = unique_elements[counts_elements == max(counts_elements)]\nfor i in elements:\n print(i)\n', "import numpy as np\n\nN = int(input())\na = [input() for _ i... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s103738324', 's131063754', 's761792725', 's770154926', 's817183112', 's836920927', 's956150570', 's809552413'] | [12504.0, 42092.0, 3060.0, 12496.0, 12420.0, 12504.0, 16280.0, 49976.0] | [161.0, 427.0, 19.0, 152.0, 156.0, 153.0, 232.0, 881.0] | [243, 273, 238, 258, 258, 246, 262, 386] |
p02773 | u854962015 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N=int(input())\nL=list(input() for i in range(N))\nL=sorted(L)\nX=L[0]\nc=0\nd=0\ne=[]\nfor i in range(N):\n if L[i]==X:\n c+=1\n elif L[i]!=X and d<c:\n d=c\n c=0\n e=[]\n e.append(X)\n X=L[i]\n c+=1\n elif L[i]!=X and d==c:\n c=1\n e.append(X)\n X=L[i]\n if i==N-1:\n e.appen... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s259578100', 's919077385', 's282448785'] | [25488.0, 25420.0, 25536.0] | [484.0, 465.0, 466.0] | [375, 410, 454] |
p02773 | u855570300 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["if __name__ == '__main__':\n N = int(input())\n kv = collections.defaultdict(int)\n max_cnt = 0\n res = []\n for _ in range(N):\n word = input()\n kv[word] += 1\n if kv[word] == max_cnt:\n res.append(word)\n elif kv[word] > max_cnt:\n res = [word]\n ... | ['Runtime Error', 'Accepted'] | ['s625649964', 's990503233'] | [3064.0, 33680.0] | [17.0, 712.0] | [366, 395] |
p02773 | u857293613 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["n = int(input())\ndic = {}\nfor _ in range(n):\n s = input()\n if s not in dic:\n dic[s] = 1\n else:\n dic[s] += 1\nm = max(dic.values())\nanslis = []\nfor k, v in dic.items():\n if v == m:\n anslis.append(k)\nprint('/n'.join(anslis))", 'n = int(input())\nlis = [input() for _ in range... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s701420237', 's850663675', 's575788613'] | [34652.0, 29072.0, 34140.0] | [404.0, 2105.0, 578.0] | [254, 261, 262] |
p02773 | u857330600 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\nl=[]\nlis=[]\nfor i in range(n):\n s=str(input())\n if not s in set(l):\n l.append(s)\n lis.append([s,0])\n for i in range(len(l[0])):\n if lis[i][0]==s:\n lis[i][1]+=1\n break\ntmp=lis[0][1]\ntmpl=[lis[0][0]]\nfor j in range(1,len(l)):\n if tmp<lis[j][1]:\n tmp=lis[j][1]\n ... | ['Wrong Answer', 'Accepted'] | ['s499522220', 's089760983'] | [5452.0, 45040.0] | [2104.0, 717.0] | [446, 219] |
p02773 | u860898526 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\n\nnumber = int(input())\n\narray = []\n\nfor i in range(number):\n array.append(input())\n\ndic = collections.Counter(array).most_common()\n\nmax_dic = [dic[0][0]]\n\nfor i in range(len(dic) - 1):\n if dic[i + 1][1] == dic[0][1]:\n max_dic.append(dic[i + 1][0])\n\nfor i in range(len(m... | ['Wrong Answer', 'Accepted'] | ['s445174484', 's259355421'] | [45040.0, 45036.0] | [584.0, 796.0] | [332, 356] |
p02773 | u861340374 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["n=int(input())\ns=sorted([input() for i in range(n)])\nans = ['']\nx=1\nmax=0\nfor k in range(n):\n if k<n-1:\n if s[k]==s[k+1]:\n x+=1\n else:\n if max<x:\n ans=[s[k]]\n max=x\n if max==x:\n ans.append(s[k])\n x... | ['Runtime Error', 'Accepted'] | ['s552919644', 's045687750'] | [19332.0, 20140.0] | [546.0, 647.0] | [480, 477] |
p02773 | u861886710 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nimport itertools\n\nN = int(input())\nS = []\nfor i in range(N):\n s = input()\n S.append(s)\n\ncounter = collections.Counter(S)\nmode_v = counter.most_common()[0][-1]\nit = itertools.takewhile(\n lambda kv : kv[-1] == mode_v, counter.most_common() \n)\n\nprint(*(k for k, v in it))... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s149054826', 's458042643', 's892244731', 's925699040', 's456709892'] | [49732.0, 23400.0, 31084.0, 31112.0, 38452.0] | [402.0, 255.0, 271.0, 279.0, 454.0] | [303, 171, 455, 455, 459] |
p02773 | u863964720 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nN = int(input()) \nS = [0]*N\nfor i in range(N):\n S[i] = input()\nc = collections.Counter(S)\nvalues,counts = zip(*c.most_common())\nX = c.most_common()[0][1]\nfor i in range(0,len(c.most_common())):\n if c.most_common()[i][1] == X:\n list.append(c.most_common()[i][0])\nlist.sort()\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s240513280', 's308315123', 's019962150'] | [59492.0, 59488.0, 59492.0] | [696.0, 744.0, 945.0] | [363, 372, 374] |
p02773 | u866070271 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = input()\na = input().split("")\nb = list(set([x for x in a if a.count(x) > 1]))\n\nfor i in b:\n print(i)\n', 'n = input()\na = input().split("")\nb = list(set([x for x in a if a.count(x) > 2]))\n\nfor i in b:\n print(i)\n ', 'n = input()\na = input().split(" ")\nb = set([x for x in a if a.count(x) > 1])\n\n... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s065465683', 's236894120', 's308162887', 's570569725'] | [2940.0, 3060.0, 2940.0, 46740.0] | [18.0, 18.0, 17.0, 1074.0] | [108, 108, 103, 389] |
p02773 | u866410186 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['def solve(n: int, words: list):\n word_map = dict()\n max_count = 0\n for word in words:\n count = word_map.get(word, 0) + 1\n word_map[word] = count\n max_count = max(max_count, count)\n \n for word in sorted(word_map):\n if(word_map[word] == max_count):\n print(w... | ['Wrong Answer', 'Accepted'] | ['s041592081', 's114475311'] | [3064.0, 35220.0] | [18.0, 659.0] | [439, 442] |
p02773 | u867736259 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['i = int(input())\n\ndic = {}\nfor j in range(i):\n word = input()\n if word in dic:\n dic[word] += 1\n else:\n dic[word] = 1\n\n\ndic2 = sorted(dic.items(), key=lambda x:x[1])\nprint(dic2)\nk = len(dic2)-1\ns = 0\nans = []\nfor p in range(len(dic2)):\n t = dic2[k][1]\n ans.append(dic2[k][... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s676250107', 's998596226', 's180124298'] | [53212.0, 53212.0, 45780.0] | [877.0, 973.0, 733.0] | [429, 416, 404] |
p02773 | u868701750 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["def main():\n import sys\n from collections import Counter\n\n N = int(input())\n S = [sys.stdin.readline().rstrip('\\n') for _ in range(N)]\n\n print(S)\n\n c = Counter(S)\n _max = max(c.values())\n\n keys = [k for k, v in c.items() if v == _max]\n\n print('\\n'.join(sorted(keys)))\n\n\nif... | ['Wrong Answer', 'Accepted'] | ['s422025551', 's971923355'] | [40808.0, 35936.0] | [356.0, 353.0] | [334, 316] |
p02773 | u869474504 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nlist_S = [input() for i in range(N) ]\nlist_S.sort()\nlist_a = []\na = 0\nwhile a < N :\n list_a.append(list_S.count(list_S[a]))\n a += list_S.count(list_S[a])\nnewlist_a = sorted(list_a,reverse=True)\nn = newlist_a.count(newlist_a[0])\nans = ""\nif n == 1:\n t = 0\n for i in range(list_... | ['Runtime Error', 'Time Limit Exceeded', 'Wrong Answer', 'Runtime Error', 'Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Wrong Answer', 'Time Limit Exceeded', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Wrong... | ['s027224554', 's064157222', 's141261645', 's278398289', 's304998251', 's324544197', 's338545356', 's376396509', 's479556218', 's540989991', 's594864981', 's618277137', 's641086688', 's660970120', 's701890493', 's710243100', 's782259646', 's937249960', 's950429654', 's031563589'] | [17796.0, 25788.0, 20440.0, 25672.0, 25688.0, 23008.0, 17800.0, 23608.0, 26172.0, 22996.0, 25040.0, 24624.0, 3064.0, 25688.0, 17796.0, 17800.0, 17800.0, 25040.0, 25684.0, 50740.0] | [2105.0, 2105.0, 2105.0, 565.0, 2105.0, 2105.0, 2105.0, 2105.0, 2108.0, 2105.0, 2105.0, 2109.0, 18.0, 538.0, 2104.0, 2104.0, 2104.0, 2105.0, 2105.0, 848.0] | [738, 873, 843, 839, 846, 1097, 764, 1018, 1008, 1433, 1191, 1008, 853, 837, 826, 1007, 1197, 1029, 1056, 397] |
p02773 | u869917163 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nN=int(input())\nS=[]\nfor i in range(N):\n S.append(str(input())) \nc=collections.Counter(S)\nc_sorted=c.most_common()\ns=max(c.values())\nfor i in c_sorted:\n if i[1]==s:\n print(i[0])', 'import collections\nN=int(input())\nS=[]\nfor i in range(N):\n S.append(str(input())) \nc=colle... | ['Wrong Answer', 'Accepted'] | ['s953131174', 's450156978'] | [46888.0, 46080.0] | [593.0, 1025.0] | [207, 209] |
p02773 | u870684607 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nN = int(input())\narr = []\narr_max = []\nfor i in range(N):\n arr.append(input())\ndic = Counter(arr)\ninverse = [(value, key) for key, value in dic.items()]\nmax_s = max(inverse)[0]\nfor key,value in dic.items():\n if value == max_s: \n arr_max.append(key)\n else: co... | ['Wrong Answer', 'Accepted'] | ['s270654885', 's737024116'] | [47072.0, 49228.0] | [588.0, 789.0] | [340, 348] |
p02773 | u871352270 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nn = int(input())\nS = [input() for i in range(n)]\nc = collections.Counter(S)\nli = c.most_common()\nM = li[0][1]\nfor x in li:\n if x[1] == M:\n print(x[0])\n else:\n break', 'import collections\nn = int(input())\nS = [input() for i in range(n)]\nc = collections.Counter(S)\nli... | ['Wrong Answer', 'Accepted'] | ['s641930158', 's716222877'] | [46872.0, 47636.0] | [522.0, 694.0] | [203, 255] |
p02773 | u871934301 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N=int(input())\nS=[input().split() for i in range(N)]\nA=[]\nL=len(S)\nwhile L>0:\n S=[s for s in S if s!=S[0]]\n A.append(L-len(S))\nprint(max(A))\n\n\n', 'N=int(input())\nP=[input().split() for i in range(N)]\nprint(c.most_common(P))', 'n = int(input())\ns = [input() for _ in range(n)]\nd = {}\nfor w in s:\n ... | ['Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s049392950', 's126022190', 's479230029'] | [225348.0, 51552.0, 47352.0] | [2118.0, 407.0, 694.0] | [149, 76, 272] |
p02773 | u873134970 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import defaultdict\nimport collections\nN=int(input())\nss = []\nfor i in range(N):\n ss.append(input())\n\nc = collections.Counter(ss)\nd_=c.most_common()\nd_.sort()\n#print(d_)\nmx = d_[0][1]\nm=len(d_)\nfor i in range(m):\n if d_[i][1] == mx:\n print(d_[i][0])\n else:\n break', 'from coll... | ['Wrong Answer', 'Accepted'] | ['s571001045', 's264515217'] | [46872.0, 46904.0] | [953.0, 981.0] | [315, 314] |
p02773 | u873616440 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nimport numpy as np\nN = int(input())\nS = [input() for _ in range(N)]\nc = Counter(S)\ncandidate = np.array(list(c.keys()))[np.array(list(c.values())) == max(c.values())]\nfor i in range(len(candidate)):\n print(candidate[i])', 'from collections import Counter\nimport numpy as np\nN ... | ['Wrong Answer', 'Accepted'] | ['s169206997', 's112756153'] | [64192.0, 79236.0] | [811.0, 1037.0] | [252, 260] |
p02773 | u874644572 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\na = dict()\n\nfor i in range(n): \n s = input()\n a.setdefault(s, 0)\n a[s] += 1\n \nans = []\nmx = 0\nfor key, value in a.items(): \n if mx < value:\n mx = value\n ans = [key]\n elif mx == value:\n ans.append(key)\n\nfor i in ans:\n print(i)', 'from collections import Counter\nn = i... | ['Wrong Answer', 'Accepted'] | ['s061300344', 's944191437'] | [32096.0, 45040.0] | [579.0, 657.0] | [326, 193] |
p02773 | u875541136 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["import collections\nN = int(input())\nS = [input() for _ in range(N)]\nv, c = zip(*collections.Counter(S).most_common())\nn = c.count(c[0])\nprint('\\n'.join(v[:n]))", "import collections\nN = int(input())\nS = [input() for _ in range(N)]\nv, c = zip(*collections.Counter(S).most_common())\nn = c.count(c[0])\nprint('\... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s127447238', 's250892668', 's477970349', 's092579852'] | [47212.0, 47212.0, 35952.0, 35952.0] | [486.0, 681.0, 362.0, 512.0] | [159, 167, 192, 200] |
p02773 | u875600867 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['\nN = int(input())\n\ns = {}\nfor _ in range(N):\n tmp = input()\n try:\n if s[tmp]:\n s[tmp] +=1\n except:\n s[tmp] = 1\n \n#print(s)\nmax_kv_list = [kv[0] for kv in s.items() if kv[1] == max(s.values())]\n#print(max_kv_list)\n\nfor tmp in max_kv_list:\n print(tmp)', 'import c... | ['Wrong Answer', 'Accepted'] | ['s915977225', 's227243941'] | [32096.0, 46904.0] | [2104.0, 1064.0] | [310, 338] |
p02773 | u876295560 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nN=int(input())\nlist1=[]\nfor i in range(N) :\n list1.append(input())\n\nvariety_list=dict(collections.Counter(list1).most_common())\nprint(variety_list)\nkey_list=list(variety_list.keys())\nvalue_list=list(variety_list.values())\nlist2=[]\n\n\nfor i in range(len(value_list)) :\n if i==0 :\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s320596363', 's413205713', 's802855368'] | [55788.0, 39276.0, 36464.0] | [871.0, 118.0, 674.0] | [465, 422, 344] |
p02773 | u877428733 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['\nimport collections\n\nN = int(input())\nlist_1 = [input() for i in range(N)]\nlist_2 = collections.Counter(list_1)\n\nfor i in list_2:\n print(i)\n\nm = max(list_2.values())\n\nans = [k for k in list_2 if list_2[k] == m]\n\nfor l in sorted(ans):\n print(l)', 'import collections\n\nN = int(input())\nlist_1 = [... | ['Wrong Answer', 'Accepted'] | ['s302021717', 's965402569'] | [36588.0, 35572.0] | [739.0, 622.0] | [249, 218] |
p02773 | u878239774 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\ndata_list = [input() for i in range(n)]\ndata_list.sort()\n\n\ndata_set = set(data_list)\nsorted_list = sorted(data_set)\n\ncount_list = [0] * len(sorted_list)\n\nfor i in range(len(sorted_list)):\n for j in range(len(data_list)):\n if sorted_list[i] == data_list[j]:\n count_lis... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s268727090', 's935653381', 's105376649'] | [29628.0, 17800.0, 35572.0] | [2105.0, 449.0, 891.0] | [451, 278, 315] |
p02773 | u878654696 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["class Counter(dict):\n def __missing__(self, i):\n return 0\n\nn = int(input())\n\ns = Counter()\n\nfor _ in range(n):\n i = input()\n s[i] += 1\n\ns = dict(sorted(s.items(), key=lambda x: -x[1]))\nm = list(s.values())[0]\n\nans = []\nfor i in s:\n if s[i] == m:\n ans.append(i)\n\nprint('\\n'.join(ans))\n",... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s122918237', 's189049338', 's981671971', 's246935333'] | [66140.0, 2940.0, 66268.0, 43228.0] | [627.0, 17.0, 556.0, 737.0] | [294, 60, 286, 324] |
p02773 | u880850253 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | [' \ndic = {}\nm = 0\n\nfor i in L:\n if i in dic:\n dic[i] = dic[i] + 1\n else:\n dic[i] = 1\n \n if m < dic[i]:\n m = dic[i]\n\nn = []\nfor i in dic:\n if dic[i] == m:\n n.append(i)\nn.sort()\nfor i in n:\n print(i)', '\nN = int(input())\nL = [ input() for i in ran... | ['Runtime Error', 'Accepted'] | ['s249241658', 's405907955'] | [3064.0, 35216.0] | [17.0, 689.0] | [249, 311] |
p02773 | u885630173 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["import collections\n\nN = int(input())\ndic = {}\nfor i in range(N):\n s = str(input())\n if dic.get(s):\n dic[s] += 1\n else:\n dic[s] = 1\n\nmax_k_list = [kv[0] for kv in dic.items() if kv[1] == max(dic.values())]\ns_n = '\\n'.join(max_k_list)\nprint(s_n)", 'N = int(input())\ndic = {}\nnmax = 1\nfor i in r... | ['Wrong Answer', 'Accepted'] | ['s099027418', 's848149622'] | [32476.0, 32988.0] | [2105.0, 676.0] | [252, 307] |
p02773 | u888881904 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nn = int(input())\ns = [input() for _ in range(n)]\n\ns = collections.Counter(s)\n\nmax_kv = [kv for kv in s.items() if kv[1] == max(s.values())]\n\nfor i in max_kv:\n print(i[0])', 'import collections\nn = int(input())\ns = [input() for _ in range(n)]\n\ns = collections.Counter(s).most_common()... | ['Wrong Answer', 'Accepted'] | ['s918501404', 's328881914'] | [35576.0, 45036.0] | [2105.0, 724.0] | [192, 222] |
p02773 | u891884439 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\npoll = {}\nfor i in range(N):\n S = input()\n if S in poll:\n poll[S] = poll[S] + 1\n else:\n poll[S] = 1\n \na = [k for k, v in poll.items() if v == max(poll.values())]\n\nfor el in a:\n print(el)', 'N = int(input())\npoll = {}\nfor i in range(N):\n S = input()\n... | ['Wrong Answer', 'Accepted'] | ['s278516896', 's312514542'] | [32096.0, 32096.0] | [2104.0, 691.0] | [236, 249] |
p02773 | u891945807 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input().rstrip())\ndict = {}\n\ndef in_dict(key):\n if key in dict.keys():\n dict[key] += 1\n else:\n dict[key] = 1\n \n\nfor n in range(1,N):\n in_dict(input().rstrip())\n \nmax_val = max(dict.values())\nkeys_max = [key for key in dict if dict[key] == max_val]\n\nkeys_max = sorted(keys_max)\n\nfor... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s750132149', 's894947479', 's444059721'] | [32988.0, 42028.0, 39084.0] | [701.0, 753.0, 850.0] | [332, 491, 472] |
p02773 | u896741788 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\nl=[input() for i in range(n)]\nfrom collections import Counter as co\nk=co(l).most_common()\nd=k[0][1]\nfor a,s in k:\n if s!=d:break\n else:\n print(a)', 'n=int(input())\nl=[input() for i in range(n)]\nfrom collections import Counter as co\nk=co(l).most_common()\nd=k[0][1]\nprint(*sorted([a fo... | ['Wrong Answer', 'Accepted'] | ['s951526681', 's194482736'] | [45072.0, 45072.0] | [502.0, 844.0] | [167, 164] |
p02773 | u898058223 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nN=int(input())\nS=[input() for i in range(N)]\nS=sorted(S)\nC=collections.Counter(S).most_common()\nfor i in range(len(C)):\n print(C[i][0])', 'from statistics import mode\n\nN=int(input())\nS=[input() for i in range(N)]\nS=sorted(S)\nprint(mode(S))', 'n=int(input())\ns=[input() for i in range(n)... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s104136554', 's646967488', 's472011549'] | [45316.0, 47016.0, 30256.0] | [810.0, 618.0, 918.0] | [155, 100, 284] |
p02773 | u909851424 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nS = {}\n\nfor i in range(N):\n arg = input()\n if (arg in S):\n S[arg] = S[arg] + 1\n else:\n S[arg] = 1\nvalSorted = sorted(S.items(), key=lambda x:(-x[1], x[0]))\nbreakKey = None\nfor key, value in valSorted:\n if breakKey is None:\n breakKey = value\n if breakK... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s705589776', 's771773925', 's717692572'] | [3064.0, 32224.0, 59228.0] | [17.0, 364.0, 1054.0] | [349, 352, 346] |
p02773 | u912245812 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nn = int(input())\narr = list(map(str,input().split()))\ncnt, mx = Counter(), -1\nfor i in arr:\n cnt[i] += 1\n mx = max(mx,cnt[i])\nres = []\nfor i in arr:\n if cnt[i] == mx:\n res.append(i)\nres.sort()\nprint(res[0])', 'from collections import Counter\nn, cnt, mx, arr... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s351416438', 's491122471', 's261876769'] | [3316.0, 33748.0, 33740.0] | [20.0, 956.0, 1024.0] | [254, 278, 297] |
p02773 | u917558625 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nimport itertools\ns=int(input())\nl=[input() for i in range(s)]\ncounter = collections.Counter(l)\n\nmode_v = counter.most_common()[0][-1]\nit = itertools.takewhile(\n lambda kv: kv[-1] == mode_v, counter.most_common()\n)\nu=[]\nfor k, v in it:\n u.append(k)\nu.sort\nfor i in range(len(u)):\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s166051331', 's612269778', 's895570570'] | [45040.0, 45040.0, 45120.0] | [720.0, 620.0, 837.0] | [315, 287, 320] |
p02773 | u919235786 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\nl=0\ns=[]\nfor i in range(n):\n si=input()\n s.append(si)\n li=len(si)\n l=max(l,li)\nans=[]\nfor i in range(n):\n if len(s[i])==l:\n ans.append(s[i])\n\nans.sort()\nfor i in ans:\n print(i)', 'n=int(input())\ns=dict()\nfor i in range(n):\n si=input()\n if si in s:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s341817425', 's913383964', 's320759754'] | [24752.0, 38000.0, 35360.0] | [397.0, 422.0, 473.0] | [216, 213, 229] |
p02773 | u920340928 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nd = {}\nfor i in range(N):\n s = input()\n if s not in d:\n d[s] = 1\n else:\n d[s] += 1\n\nprint(d)\n\nlist = sorted(d.values())\nprint(list)\nmax_value = max(list)\nsorted_list = sorted(d.items(), key=lambda x: x[0])\nprint(sorted_list)\n\nfor i, j in sorted_list:\n if j ... | ['Wrong Answer', 'Accepted'] | ['s704305398', 's913894322'] | [62044.0, 48092.0] | [882.0, 800.0] | [330, 289] |
p02773 | u921950806 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["from sys import stdin\nimport collections\n\nn = int(input())\ns = [input() for i in range(n)]\n\ncounted = collections.Counter(s)\n\nm = max(counted.values())\n\nchars = [key for key, value in counted.items()\n if value == m]\nmoji = '\\n'.join(chars)\n\nprint(moji)", "import collections\n\nn = int(input... | ['Wrong Answer', 'Accepted'] | ['s612575765', 's241815459'] | [35952.0, 35952.0] | [362.0, 621.0] | [264, 256] |
p02773 | u923270446 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\nd = dict()\ns = [input() for i in range(n)]\nl = []\nfor i in set(s):\n d[i] = 0\nfor i in s:\n d[i] += 1\nprint(d.items())\nl = [k for k, v in d.items() if v == max(d.values())]\nl.sort()\nprint(*l, sep="\\n")', 'from collections import Counter\nn = int(input())\ns = [input() for i in range(n... | ['Wrong Answer', 'Accepted'] | ['s118803121', 's106236364'] | [50816.0, 45040.0] | [2105.0, 712.0] | [222, 214] |
p02773 | u924783770 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N=int(input())\nS=[]\nfor i in range(N):\n S.append(input())\nS.sort()\nS.reverse()\nprint(S)\nans=[]\nwhile len(S):\n if len(S)==1:\n x = [S.pop(0), 1]\n ans.append(x)\n break\n x = [S.pop(0), 1]\n for i in S[:]:\n if x[0] == i:\n S.remove(i)\n x[1]+=1\n ... | ['Wrong Answer', 'Accepted'] | ['s934707884', 's601272915'] | [25028.0, 32096.0] | [2105.0, 627.0] | [448, 1040] |
p02773 | u931462344 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\n\nN = int(input())\nS = [input() for _ in range(N)]\nClist = Counter(S).most_common()\nnum = Clist[0][1]\nanses = [Clist[0][0]]\nfor X in Clist[1:]:\n if X[1] == num:\n anses.append(X[0])\n\nfor ans in anses:\n print(ans)', 'from collections import Counter\n\nN = int(inpu... | ['Wrong Answer', 'Accepted'] | ['s873953250', 's984431293'] | [45036.0, 45040.0] | [534.0, 687.0] | [255, 267] |
p02773 | u932370518 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\n\nif __name__ == "__main__":\n N = int(input())\n S = []\n for i in range(N):\n S.append(input())\n S_collect = collections.Counter(S)\n S_tp = []\n for word in S_collect.most_common():\n S_tp.append(word)\n for i in S_tp:\n if i[1] == S_tp[0][1]:\n ... | ['Wrong Answer', 'Accepted'] | ['s562375455', 's811825349'] | [46860.0, 49332.0] | [594.0, 795.0] | [356, 458] |
p02773 | u932868243 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\ns=[input() for x in range(n)]\nl=list(set(s))\ncnt=[0]*len(l)\nfor ss in l:\n for sss in s:\n if sss==ss:\n cnt[l.index(ss)]+=1\nm=max(cnt)\nans=[]\nfor cc in cnt:\n if cc==m:\n ans.append(cnt.index(cc))\nfor aa in ans:\n print(l[aa])', 'n=int(input())\ns=[input() for x in range(n)]\nl=l... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s024381409', 's205818183', 's297466604', 's297649496', 's882515909', 's858873817'] | [29076.0, 29076.0, 29076.0, 29076.0, 17408.0, 60912.0] | [2105.0, 2105.0, 2105.0, 471.0, 265.0, 818.0] | [250, 254, 224, 223, 233, 227] |
p02773 | u933129390 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\n\n\nn = int(input())\ns = []\nfor i in range(n):\n s.append(input())\n\ndic = collections.Counter(s)\nk = dic.most_common()\nm = k[0][1]\nmx = m\ni = 0\nwhile m == mx: \n print(k[i][0])\n i += 1\n if i > len(k)-1:\n break\n m = k[i][1]\n\n', 'import collections\n\n\nn = int(i... | ['Wrong Answer', 'Accepted'] | ['s216069760', 's426078811'] | [46928.0, 49240.0] | [608.0, 759.0] | [261, 320] |
p02773 | u934868410 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\nd = {}\nfor i in range(n):\n s = input()\n d[s] = 1 if not s in d else d[s] += 1\n\nans = []\nc = max(d.values())\nfor k,v in d.items():\n if v == c:\n ans += [k]\nfor x in sorted(ans):\n print(x)', 'n = int(input())\nd = dict()\nfor i in range(n):\n s = input()\n if not s in d:\n ... | ['Runtime Error', 'Accepted'] | ['s667079029', 's570376159'] | [2940.0, 32988.0] | [17.0, 638.0] | [209, 248] |
p02773 | u937745164 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['if __name__=="__main__":\n n = int(input())\n s=[]\n for i in range(n):\n s.append(input())\n \n s_most = s.most_common()\n\n print(s_most[0])\n\n for i in range(1,len(s_most)):\n if s_most[i]==s_most[0]:\n print(s_most[i])\n else:\n break', 'from co... | ['Runtime Error', 'Accepted'] | ['s224928913', 's737337631'] | [17048.0, 45040.0] | [276.0, 841.0] | [293, 446] |
p02773 | u939585142 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nS = [input() for i in range(N)]\nS.sort()\ns = set(S)\n\nans = []\nM = 1\ncc = []\nC = True\nfor i in s:\n c = 0\n for j in S:\n if i == j:\n c += 1\n cc.append(c)\n if c == 1 and max(cc) >= M:\n C = None\n if c >= M and C == None:\n M = c\n ans.append(i)\nans.sort()\n\n\nif C ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s341182868', 's619434695', 's633269042'] | [29632.0, 29636.0, 45040.0] | [2105.0, 2105.0, 684.0] | [365, 365, 211] |
p02773 | u941644149 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['from collections import Counter\nN = int(input())\n#L = []\nL = [input() for _ in range(N)]\n#for n in range(N):\n #S = input()\n #L.append(S)\nDic = Counter(L)\nmax_k_list = [kv[0] for kv in Dic.items() if kv[1] == max(Dic.values())]\nmax_k_list = max_k_list.sort()\nfor t in max_k_list:\n print(t)', 'N = in... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s383319366', 's485380148', 's496551634', 's309411997'] | [35572.0, 42764.0, 35572.0, 34012.0] | [2105.0, 369.0, 2105.0, 638.0] | [297, 329, 284, 474] |
p02773 | u943057856 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\nd=dict()\nfor _ in range(n):\n a=input()\n if a in d:\n d[a]+=1\n else:\n d[a]=1\nkeys = sorted([k for k,v in d.items() if v==max(d.values())])\nprint(keys,sep="\\n")', 'n=int(input())\nd=dict()\nfor _ in range(n):\n a=input()\n if a in d:\n d[a]+=1\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s264285541', 's292204377'] | [32096.0, 34140.0] | [2108.0, 528.0] | [195, 201] |
p02773 | u944325914 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n = int(input())\nstartlist=[]\nfor _ in range(n):\n startlist.append(input())\ndictlist=sorted(startlist)\nsetlist=list(set(dictlist))\ncountlist=[0]*(int(len(setlist)))\ncount=1\ncount2=1\nfor i in range(n):\n if i==n-1:\n countlist[i-count2+1]+=count\n elif dictlist[i+1]==dictlist[i]:\n coun... | ['Wrong Answer', 'Accepted'] | ['s556936552', 's009987907'] | [31172.0, 50176.0] | [2105.0, 521.0] | [514, 289] |
p02773 | u944643608 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nS = [input() for i in range(N)]\nS.sort()\nmaxi = 0\nans = []\ntotal_count = 0\nwhile total_count != N:\n tmp = S.count(S[total_count])\n total_count += tmp\n if maxi < tmp:\n maxi = tmp\n ans.clear()\n ans.append(S[total_count])\n elif maxi == tmp:\n ans.append(S[total_count])\nfor ... | ['Runtime Error', 'Accepted'] | ['s037993790', 's855605053'] | [17800.0, 20680.0] | [2104.0, 655.0] | [348, 572] |
p02773 | u945181840 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ["import sys\nfrom collections import Counter\n\nread = sys.stdin.read\n\nN, *S = map(str, read().split())\ns = Counter(S)\nn = max(s.values())\nanswer = [i for i, j in s if j == n]\nanswer.sort()\nprint('\\n'.join(answer))\n", "import sys\nfrom collections import Counter\n\nread = sys.stdin.read\n\nN, *S = map(str, re... | ['Runtime Error', 'Accepted'] | ['s963425667', 's882460988'] | [38520.0, 38520.0] | [102.0, 299.0] | [211, 219] |
p02773 | u947327691 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['n=int(input())\nd=dict()\n\nfor i in range(n):\n a=input()\n d.setdefault(s,0)\n d[s] += 1\n\nmx=0\nresult=[]\nfor key,value in d.items:\n if mx < value:\n mx = value\n result=[key]\n elif mx == value:\n result.append(key)\n\nresult.sort()\n\nfor i in range(len(result)):\n print(i)', 'n = int(input())\... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s228412172', 's239165153', 's254388057', 's798873159', 's562351109'] | [3064.0, 29632.0, 29632.0, 29628.0, 32096.0] | [22.0, 2105.0, 2105.0, 2105.0, 724.0] | [277, 418, 417, 408, 287] |
p02773 | u948521599 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nS = []\nfor x in range(N):\n S.append(input())\nS_label_n = []\nS_label = list(set(S))\nfor x in S_label:\n S_label_n.append(S.count(x))\nmaxIndex = [i for i, x in enumerate(S_label_n) if x == max(S_label_n)]\nans_list = []\nfor x in maxIndex:\n ans_list.append(S_label[x])\nans_list.sort()\... | ['Wrong Answer', 'Accepted'] | ['s643715594', 's702422799'] | [29076.0, 46168.0] | [2105.0, 534.0] | [321, 395] |
p02773 | u952114288 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['k=int(input())\np=[input() for i in range(k)]\nm=0\na=[]\nfor j in frozenset(p):\n if not p.count(j)<m:\n a.append(j)\nprint("\\n".join(sorted(a)))', 'from collections import Counter\nk=int(input())\np=Counter(input() for f in range(k))\nj=sorted(p.most_common(), key=lambda a:1-a[1])\nj=[m[0] for m in j if m[1]==... | ['Wrong Answer', 'Accepted'] | ['s403902738', 's296881371'] | [29076.0, 45136.0] | [2109.0, 633.0] | [143, 195] |
p02773 | u954153335 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nn=int(input())\ndata=[""]*n\nfor i in range(n):\n data[i]=input()\ncount=collections.Counter(data)\nnum=max(count.values())\nfor v,k in count.items():\n if k==num:\n print(v)', 'import collections\nn=int(input())\ndata=[""]*n\nfor i in range(n):\n data[i]=input()\ndata=sorted(data)... | ['Wrong Answer', 'Accepted'] | ['s224359667', 's482564294'] | [38884.0, 40932.0] | [344.0, 446.0] | [198, 216] |
p02773 | u957198490 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['import collections\nN = int(input())\nS = [str(input()) for i in range(N)]\nnew_S = collections.Counter(S)\nM = max(new_S.values())\n#X = []\nfor K,V in new_S.items():\n if V == M:\n print(K)', 'import collections\nN = int(input())\nS = [str(input()) for i in range(N)]\nnew_S = collections.Counter(S)\nM = max(new... | ['Wrong Answer', 'Accepted'] | ['s999844326', 's739531841'] | [35572.0, 35568.0] | [479.0, 650.0] | [187, 221] |
p02773 | u957222656 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['\nnum = input()\nl = []\nfor i in range(0,int(num)):\n l.append(input())\n\ncnt = []\nfor item in list(set(l)):\n cnt.append(l.count(item))\n\nnum_dict = dict(zip(list(set(l)),cnt))\nmax_v = max(num_dict.values())\n\nkeys = []\n\nfor word, num in num_dict.items():\n if num == max_v:\n keys.append(word... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s019324203', 's915215226', 's898990182'] | [29076.0, 2940.0, 32480.0] | [2105.0, 17.0, 620.0] | [323, 341, 170] |
p02773 | u957843607 | 2,000 | 1,048,576 | We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order. | ['N = int(input())\nstr_lis = []\nfor i in range(N):\n str_lis.append(ord(input()))\n\nmax_num = 0\nmax_str = []\nfor i in str_lis:\n if str_lis.count(i) > max_num and not i in max_str:\n max_num = str_lis.count(i)\n max_str = []\n max_str.append(i)\n elif str_lis.count(i) == max_num and not i in max_str:\n... | ['Runtime Error', 'Accepted'] | ['s718678421', 's138264763'] | [3064.0, 49196.0] | [18.0, 836.0] | [431, 287] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.