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 | u106342872 | 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 s[i] = str(input())\n\ndict = {}\n\nfor i in range(n):\n if s[i] in dict:\n dict[s[i]] += 1\n else:\n dict[s[i]] = 1\n \nm = max(dict.values())\n\nkeys = [k for k, v in dict.items() if v == m]\nfor i in range(len(keys)):\n print(ke... | ['Wrong Answer', 'Accepted'] | ['s052769712', 's055873393'] | [35176.0, 35172.0] | [609.0, 732.0] | [308, 320] |
p02773 | u107915058 | 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 d[S] = 1\nm = d[max(d)]\nl=[]\nfor i in d:\n if d[i] == m:\n l.append(i)\nfor i in sorted(l):\n print(i)', 'd = {}\nfor i in range(n):\n if s[i] in d:\n d[s[i]] += 1\n else:\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s100868606', 's445539636', 's923523144', 's620528894'] | [9132.0, 9052.0, 8960.0, 38580.0] | [25.0, 25.0, 24.0, 453.0] | [220, 196, 169, 256] |
p02773 | u108898293 | 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 itertools,collections\na=int(input())\nl1=[str(input()) for n in range(0,a)]\nc = collections.Counter(l1)\naa=int(c.most_common()[0][1])\n#print(c.most_common(0))\n#print(aa)\na2 =[print(w)for w,r in c.most_common() if r==aa]\n', 'import itertools,collections\na=int(input())\nl1=[str(input()) for n in range(0,... | ['Wrong Answer', 'Accepted'] | ['s405160315', 's687970959'] | [47128.0, 45044.0] | [614.0, 834.0] | [226, 267] |
p02773 | u111473084 | 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\ndata = {}\nnames = []\nfor i in range(n):\n s = input()\n if s in names:\n data[s] += 1\n else:\n data[s] = 1\n names.append(s)\n\nmax_poll = 0\nwinner = []\nfor key, value in data.items():\n if max_poll < value:\n max_poll = value\n winner = [key]\n ... | ['Wrong Answer', 'Accepted'] | ['s594018564', 's767967098'] | [5016.0, 32096.0] | [2111.0, 812.0] | [418, 335] |
p02773 | u111652094 | 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. | ['\nfrom collections import Counter\n\n\nN = int(input())\nS = []\nfor i in range(N):\n S.append(input())\n\nC=Counter(S).most_common()\nL=len(C)\n\nprint(C[0][0])\n\nfor i in range(1,L):\n if C[0][1]==C[i][1]:\n print(C[i][0])', '\nfrom collections import Counter\n\n\nN = int(input())\nS = []\nfor i in ra... | ['Wrong Answer', 'Accepted'] | ['s278761794', 's848249970'] | [45032.0, 45040.0] | [559.0, 768.0] | [222, 288] |
p02773 | u112317104 | 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\n\ndef solve():\n N = int(input())\n d = defaultdict(int)\n for _ in range(N):\n a = input()\n d[a] += 1\n\n m = 0\n for k, v in d.items():\n m = max(m, v)\n \n l = []\n for k, v in d.items():\n if m == v:\n l.append(k)... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s038465684', 's198648002', 's595531903'] | [32480.0, 46696.0, 32488.0] | [725.0, 777.0, 780.0] | [372, 338, 336] |
p02773 | u113255362 | 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. | ['Row = int(input())\ndictA= {}\na = ""\nmid = 0\nfor i in range (Row):\n a = input()\n dictA.setdefault(a,0) \n dictA[a] += 1\n mid = max(mid, dictA[a])\nsDict = sorted(dictA.items())\nprint(sDict)\nfor i in range(len(dictA)):\n if sDict[i][1]== mid:\n print(sDict[i][0])', 'Row = int(input())\ndictA= {}\na = "... | ['Wrong Answer', 'Accepted'] | ['s431624971', 's514791749'] | [52288.0, 46692.0] | [760.0, 680.0] | [265, 252] |
p02773 | u114641312 | 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 = []\nfor _ in range(n):\n S.append(input()) \n\n\ncounter = Counter(S)\n\nmostnum = 0\nans = []\nfor c in counter.most_common():\n if mostnum < c[1]:\n mostnum = c[1]\n ans.append(c[0])\n else:\n break\n\nans.sort()\n\nfor a in ans... | ['Wrong Answer', 'Accepted'] | ['s747439318', 's475987935'] | [45040.0, 45040.0] | [415.0, 690.0] | [494, 495] |
p02773 | u116038906 | 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())\nword = [ input() for i in range(N) ]\n\n\nfrom collections import Counter\nkazu_word = Counter(word)\n\n\nkazu_word_a = max(kazu_word.values()) \nkazu_word_max =[i for i,v in kazu_word.items() if v == kazu_word_a )]\n\n\n\nprint("\\n".join(kazu_word_max.sort())) ', '\nN = int(input())\nword = [ in... | ['Runtime Error', 'Accepted'] | ['s147511782', 's914098389'] | [2940.0, 37516.0] | [17.0, 591.0] | [607, 530] |
p02773 | u116233709 | 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())\nli=[]\nfor i in range(n):\n s=str(input())\n li.append(s)\nli.sort(reverse=True)\nc=collections.Counter(li)\nx=len(c)\nans=[]\nfor i in range(x):\n if c.most_common(x)[i][1]==c.most_common(x)[0][1]:\n ans.append(c.most_common(x)[i][0])\n else:\n break\nfor... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s391923923', 's777083561', 's255959722'] | [45084.0, 45076.0, 35564.0] | [2106.0, 2106.0, 660.0] | [368, 333, 236] |
p02773 | u117541450 | 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\n\nN=int(input())\nl=[\'\']*N\nfor i in range(N):\n l[i]=input()\n\nl.sort()\n\nprint(l)\nc=1\nc_crt=1\npre=""\nans=[]\nfor e in l+[""]:\n if e == pre:\n c_crt+=1\n else:\n if c_crt > c:\n ans=[pre]\n c=c_crt\n elif c_crt == c:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s761705156', 's936655293', 's931127503'] | [25988.0, 58684.0, 21120.0] | [645.0, 512.0, 727.0] | [370, 118, 361] |
p02773 | u118760114 | 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())\ndic = {}\nb = []\nfor i in range(n):\n a = input()\n b.append(a)\n if i in dic:\n dic[i] += 1\n else:\n dic[i] = 1\nM = max(dic.values())\nfor j, k in sorted(dic.items):\n if k == M:\n print(j)\n', '\nn = int(input())\ndic = {}\nb ... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s089386322', 's536355624', 's807355607', 's084546037'] | [39428.0, 51496.0, 39436.0, 45712.0] | [338.0, 546.0, 330.0, 904.0] | [267, 237, 253, 249] |
p02773 | u121879791 | 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())\nname=[input() for _ in range(n)]\n\ncnt=Counter(name)\nl=max(cnt.values())\nans=[s for s,c in cnt.items() if c==1]\nans.sort()\nprint('\\n'.join(ans))", "from collections import Counter\n \nn = int(input())\nsss = [input() for _ in range(n)]\ncnt = Counter(sss)\nl = ma... | ['Wrong Answer', 'Accepted'] | ['s428698716', 's984680039'] | [35952.0, 35952.0] | [528.0, 520.0] | [190, 202] |
p02773 | u121891161 | 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(str(input()))\n\nd = {}\n\nfor item in s:\n if item in d.keys():\n d[item] += 1\n else:\n d[item] = 1\n\nstart = time.time()\nm = [k for k, v in d.items() if v == max(d.values())]\nm.sort()\nfor item in m:\n print(item)\n', 'from collec... | ['Runtime Error', 'Accepted'] | ['s872659595', 's420408103'] | [35220.0, 45032.0] | [418.0, 879.0] | [285, 348] |
p02773 | u123849536 | 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. | ['#155c\nimport collections\nn = int(input())\ns = [input() for _ in range(n)]\n\nc = collections.Counter(s)\nret = []\ntmp = []\ncurrent_v = 0\n\nfor k, v in c.most_common():\n if current_v != v:\n current_v = v\n if tmp != []:\n ret.extend(sorted(tmp))\n break\n tmp.append(k)\n\nprint(ret)', '#155c\... | ['Wrong Answer', 'Accepted'] | ['s285104309', 's202551606'] | [45040.0, 45040.0] | [405.0, 740.0] | [290, 260] |
p02773 | u129961029 | 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. | ['a=int(input())\ns=[input()for _ in range(a)]\nc=Counter(s)\nm=0 \nm=max(m,v)\nans=[]\nfor k,v in c.items():\n if m == v:\n ans.append(k)\nans.sort()\nprint(ans)\n', 'import collections\na=int(input())\ns=[input()for _ in range(a)]\nc=collections.Counter(s)\nm=0 \nfor v in c.values(): \n m=max(m,v)\nans=[... | ['Runtime Error', 'Accepted'] | ['s639330143', 's028116896'] | [17056.0, 35572.0] | [267.0, 656.0] | [161, 234] |
p02773 | u129978636 | 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 k in range(n)])\ns3 = sorted(list(set(s)))\nif(len(set(s))==len(s)):\n for u in range(len(s)):\n print(s[u])\n exit()\nelse:\n s1=s2 = [m for m in s3 if s.count(m)>1]\n i = (len(s)-len(s1))//len(s3) ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s798609439', 's941191112', 's812802900'] | [2940.0, 2940.0, 43228.0] | [18.0, 18.0, 757.0] | [482, 458, 302] |
p02773 | u131411061 | 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 S = [input() for _ in range(N)]#list()\n\n \n # S.append(input())\n \n\n\n# c = 0\n target = {}\n\n for word in S:\n if word in target:\n target[word] += 1\n else:\n target[word] = 1\n\n# c = S.count(i)\n# ta... | ['Wrong Answer', 'Accepted'] | ['s211285124', 's079358243'] | [35220.0, 45708.0] | [476.0, 777.0] | [657, 585] |
p02773 | u131638468 | 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())\nbox={}\nfor i in range(n):\n vote=input()\n if not(vote in box):\n box[vote]=1\n else:\n box[vote]+=1\nm=0\nwin=[]\nfor num in box.values():\n if num > m:\n m=num\nfor name,num in box.items():\n if num==m:\n win.append(name)\nsorted(win)\nfor i in win:\n print(i)', 'n=int(input())\nb... | ['Wrong Answer', 'Accepted'] | ['s411918325', 's403877053'] | [32984.0, 32988.0] | [656.0, 670.0] | [279, 283] |
p02773 | u134019875 | 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 = sorted(input() for _ in range(n))\ns = list(set(L))\nc = [0] * len(s)\nfor i in range(len(s)):\n c[i] = L.count(s[i])\nm = max(c)\nfor j in range(len(c)):\n if c[j] == m:\n print(s[j])', 'n = int(input())\nL = sorted(input() for _ in range(n))\ns = list(set(L))\nc = [0] * len(s)\nm ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s347811235', 's496646596', 's784843145', 's457285133'] | [29648.0, 29640.0, 29640.0, 35324.0] | [2105.0, 2105.0, 859.0, 457.0] | [210, 227, 308, 199] |
p02773 | u135265051 | 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 math\nimport statistics\nimport collections\na=int(input())\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\n#e1,e2 = map(int,input().split())\n# f = list(map(int,input().split()))\ng = [input() for _ in range(a)]\n# h = []\n\n# h.append(list(map(int,input().split())))\n\ng.sort()\n\nma=0\ncou... | ['Wrong Answer', 'Accepted'] | ['s485460008', 's294323196'] | [26972.0, 26988.0] | [523.0, 502.0] | [733, 723] |
p02773 | u137226361 | 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\ndic = {}\nfor _ in range(n):\n\n s =input()\n if s in dic:\n dic[s] += 1\n else:\n dic[s]=1\n\nmaxdic = max(dic.values())\n\nans = [i for i in dic if dic[i]==maxdic]\nprint('\\n'.join(ans))", "n = int(input())\n\ndic = {}\nfor _ in range(n):\n\n s =input()\n if s in di... | ['Wrong Answer', 'Accepted'] | ['s030038848', 's894334384'] | [36668.0, 36712.0] | [318.0, 368.0] | [217, 225] |
p02773 | u141410514 | 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 _ in range(n):\n s.append(input())\nd = {}\nname = set(s)\nfor a in name:\n d.update({a:0})\nfor x in s:\n d[x] += 1\nds = sorted(d.items(), key=lambda x:x[1])\nmax = ds[-1][1]\nans = []\nprint(max)\nfor x in reversed(ds):\n print(x[1])\n if x[1]==max:\n ans.append(... | ['Wrong Answer', 'Accepted'] | ['s234965151', 's546423321'] | [58124.0, 57740.0] | [927.0, 843.0] | [368, 341] |
p02773 | u142223843 | 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=[]\nfor i in range(n):\n l.append(input())\nfrom collections import Counter\nS=Counter(l)\n\nfor letter, count in sorted(S.most_common()):\n print(letter)\n\n', 'n = int(input())\nl=[]\nfor i in range(n):\n l.append(input())\nfrom collections import Counter\nS=Counter(l)\n\nmn = max(S.val... | ['Wrong Answer', 'Accepted'] | ['s712397445', 's714642876'] | [47668.0, 47660.0] | [875.0, 1070.0] | [252, 295] |
p02773 | u148856702 | 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()\nn = int(n)\n# strs= input().split()\nhashs = {}\n\nfor i in range(n):\n s = input()\n if s not in hashs.keys():\n hashs[s] = 1\n else:\n hashs[s] += 1\n\nmaxs = 0\nfor key, value in hashs.items():\n maxs = max(maxs, value)\n\nfor key, value in hashs.items():\n if value == max... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s437540132', 's486707169', 's425822650'] | [32096.0, 32096.0, 32096.0] | [560.0, 594.0, 803.0] | [370, 370, 439] |
p02773 | u152554456 | 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())\nnum_list = []\nfor i in range(n):\n num_list.append(input())\n\nfrom collections import Counter\nchecked = Counter(num_list)\nbefore_count = 0\ncheck_count = 0\n\nfor keyword, count in sorted(checked.items(), key=lambda x: -x[1]):\n # print(keyword, count)\n if check_count == 0:\n c... | ['Wrong Answer', 'Accepted'] | ['s904942375', 's629929934'] | [46844.0, 46476.0] | [576.0, 769.0] | [539, 577] |
p02773 | u153968927 | 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()\nN = int(N)\nS = {}\nfor n in range(N):\n word = input()\n if word in S.keys():\n S[word] += 1\n else:\n S[word] = 1\nmax_value = max(S.values())\nfor word in S.keys():\n if S[word] == max_value:\n print(word)\n', 'N = input()\nN = int(N)\nS = {}\nfor n in range(N):\n word = input()\n if wo... | ['Wrong Answer', 'Accepted'] | ['s445449590', 's565337353'] | [32096.0, 32988.0] | [493.0, 698.0] | [223, 249] |
p02773 | u154473588 | 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. | ['# input1 = list(map(int, (input().split())))\n# input2 = list(map(int, (input().split())))\nN = int(input())\ninput2 = []\nfor i in range(N):\n input2.append(input())\n\njisyo = {}\n\nfor a in input2:\n if a not in jisyo:\n jisyo[a] = 1\n else:\n jisyo[a] += 1\n\nresult = sorted(jisyo.items(), ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s358357650', 's548034812', 's960749295'] | [44744.0, 46536.0, 47248.0] | [415.0, 528.0, 743.0] | [440, 422, 490] |
p02773 | u156815136 | 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 statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list\n#from itertools import combinations # (string,3) 3回\n#\n#\n\n#\n#\n\nmod = 10**9 + 7\n\ndef readInts():\n return list(map(int,input().split()))\ndef main():\n n = int(input())\n dic = {}\n for i in range(n):\n ... | ['Wrong Answer', 'Accepted'] | ['s870823523', 's310985196'] | [32096.0, 34012.0] | [482.0, 587.0] | [611, 666] |
p02773 | u160359809 | 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. | ['dic={}\nmax1=0\nans=[]\nn=int(input())\nfor i in range(n):\n word=input()\n if word in dic:\n dic[word]+=1\n else:\n dic[word]=1\n\nfor k in dic.values():\n if k>max1:\n max1=k\nprint(max1)\n\nfor n,b in dic.items():\n print(n,b)\n if b==max1:\n ans.append(n)\nsorted(ans)... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s294465948', 's876372182', 's966089484', 's037888538'] | [35412.0, 40668.0, 42204.0, 32988.0] | [889.0, 640.0, 773.0, 634.0] | [326, 298, 306, 296] |
p02773 | u161712560 | 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\nstrList = list([])\n\nfor i in range(N):\n strList.append(str(input()))\n\nstrDict = {}\n\nfor item in strList:\n if item not in strDict.keys():\n strDict[item] = 1\n else:\n strDict[item] += 1\n\nmaxList = list([])\n\nfor strKeys in strDict.keys():\n if strDict[strKeys] == max(strDict.v... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s437959729', 's466079344', 's147562826'] | [35220.0, 3064.0, 35220.0] | [2105.0, 19.0, 861.0] | [361, 354, 407] |
p02773 | u163421511 | 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())\nw = {}\nfor _ in range(n):\n w[i] = w.get(input(), 0) + 1\nans = sorted(i for i, j in w.items() if j == max(w.values()))\nfor i in ans:\n print(i)\n', 'n = int(input())\nw = {}\nfor _ in range(n):\n \ts = input()\n w[s] = w.get(s, 0) + 1\nans = sorted(i for i, j in w.items() if j == max(w.... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s005172114', 's134355615', 's546126229'] | [9152.0, 8952.0, 26932.0] | [27.0, 26.0, 434.0] | [165, 174, 518] |
p02773 | u164031709 | 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={}\nm=0\nfor v in range(n):\n s=input()\n if s in poll:\n poll[s]+=1\n if poll[s]>m:\n m=poll[s]\n else:\n poll[s]=0\nfor s in poll:\n if poll[s]==m:\n print(s)\n \n', 'n=int(input())\npoll={}\nm=0\nrtn=[]\nfor v in range(n):\n s=input()\n ... | ['Wrong Answer', 'Accepted'] | ['s379856391', 's692611597'] | [32096.0, 32096.0] | [444.0, 665.0] | [225, 284] |
p02773 | u166340293 | 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)]\n\nfor q in range N:\n for i in range N-1:\n if s[i]>s[i+1]:\n s0=s[i]\n s[i]=s[i+1]\n s[i+1]=s0\n\ncount=1\nmaximum=0\n\nfor j in range N-1:\n if s[j]=s[j+1]:\n count+=1\n else:\n if count>maximum:\n a=[]\n a.append(s[j])\n maxi... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s723930776', 's884670977', 's481271188'] | [2940.0, 2940.0, 20680.0] | [17.0, 19.0, 669.0] | [437, 437, 620] |
p02773 | u166621202 | 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 _ in range(N)]\n\nc = collections.Counter(sorted(S))\nkeys = [k for k, v in c.items() if v == c.most_common()[0][1]]\nprint(*keys)\n', 'N = int(input())\nS = {}\nfor i in range(N):\n tmp = input()\n if tmp in S:\n S[tmp] += 1\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s837158005', 's669461847'] | [45064.0, 32096.0] | [2106.0, 680.0] | [185, 263] |
p02773 | u166807268 | 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 OrderedDict\nN = int(input())\nans = dict()\nfor _ in range(N):\n k = str(input())\n if k in ans:\n ans[k]+=1\n else:\n ans.update({k:1})\ngroupedByValue = defaultdict(list)\nfor key, value in sorted(ans.items()):\n groupedByValue[value].append(key)\nl = groupedByValu... | ['Runtime Error', 'Accepted'] | ['s410771041', 's796184717'] | [32480.0, 45268.0] | [473.0, 1013.0] | [353, 389] |
p02773 | u168333670 | 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\ndicts = {}\n\nfor _ in range(N):\n S = input()\n if S in dicts:\n dicts[S] += 1\n else:\n dicts[S] = 1\n\ndicts = sorted(dicts.items(), key=lambda x:x[1])\nmax_list = []\n\nbuf = dicts[1][1]\nfor k, v in dicts:\n if v == buf:\n max_list.append(k)\n else:\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s877929109', 's962675188', 's084283555'] | [43228.0, 32092.0, 43224.0] | [633.0, 363.0, 769.0] | [339, 233, 361] |
p02773 | u171132311 | 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 words = {}\n for _ in range(n):\n a = input()\n if a in words:\n words[a] += 1\n else:\n words[a] = 1\n results = [kv[0] for kv in words.items() if kv[1] == max(words.values())]\n results.sort()\n print(\' \'.join(map(str, r... | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Accepted'] | ['s208116906', 's774861405', 's815227796', 's861205933', 's878459357', 's906949215'] | [32096.0, 32348.0, 32096.0, 32096.0, 29076.0, 44124.0] | [2104.0, 2104.0, 2108.0, 487.0, 2105.0, 769.0] | [355, 395, 373, 539, 377, 547] |
p02773 | u173148629 | 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 _ in range(N)]\n\nC=Counter(S)\nA=[]\nB=[]\n\nfor i,j in C.most_common():\n A.append(i)\n B.append(j)\nfor k in range(len(A)):\n if B[k]==B[0]:\n print(A[k])\n', 'from collections import Counter\nN=int(input())\nS=[input() for _ in range(... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s656602219', 's834015337', 's517068282'] | [49000.0, 3064.0, 49264.0] | [680.0, 18.0, 844.0] | [225, 224, 283] |
p02773 | u175590965 | 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 si = input()\n if si in s:\n s[si] +=1\n else:\n s[si] = 0\nl = max(s.values())\nans = []\nfor i in s:\n if s[i] == l:\n ans.append(i)\nans.sort()\nfor i in ans:\n print(i)', 'n = int(input()\ns = dict()\nfor i in range(n):\n si = in... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s024804844', 's070944424', 's585004669', 's281682447'] | [9008.0, 9008.0, 9004.0, 35288.0] | [27.0, 29.0, 26.0, 463.0] | [239, 243, 243, 243] |
p02773 | u177125607 | 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\nL = sorted(d.items(), key=lambda x: x[1], reverse=True)\nfor l in L:\n if l[1] == L[0][1]:\n print(l[0])', "n = int(input())\nd = {}\nfor i in range(n):\n S = input()\n d[S] = d[S]+1 if S in d else 1\nL ... | ['Wrong Answer', 'Accepted'] | ['s017080553', 's678083522'] | [47428.0, 49936.0] | [390.0, 474.0] | [205, 212] |
p02773 | u178304274 | 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. | ['#C-Poll\nimport collections\nn=int(input())\nwords = [input() for _ in range(n)]\ncount = collections.Counter(words)\nleng = len(count)\nFlg = True\nansallay = []\nfor num in range(n-1)\n \n if(leng == 1):\n ansallay.append(count.most_common()[num][0])\n break\n ansallay.append(count.most_common()[... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052165521', 's461963378', 's793473850', 's253794427'] | [2940.0, 45040.0, 45184.0, 47636.0] | [17.0, 597.0, 2107.0, 757.0] | [700, 719, 685, 443] |
p02773 | u183976155 | 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)]\nimport collections\ns = collections.Counter(S)\nM = max(s.values())\ns = [e for e in s if s[e] == M]\nfor e in s:\n print(e)', 'N = int(input())\nS = [input() for i in range(N)]\nimport collections\ns = collections.Counter(S)\nM = max(s.values())\ns = [e for e in ... | ['Wrong Answer', 'Accepted'] | ['s575642472', 's751409969'] | [35472.0, 35472.0] | [506.0, 635.0] | [171, 185] |
p02773 | u185405877 | 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={}\nans=[]\nfor i in range(n):\n s=input()\n if s in l:\n l[s]+=1\n else:\n l.setdefault(s,1)\nmax_l=max(l.values)\n\nfor i in l.keys():\n if l[i]==max_l:\n ans.append(i)\n \nans.sort()\n \nfor j in ans:\n print(j)', 'n=int(input())\nl={}\nans=[]\nfor i in range(n):\n ... | ['Runtime Error', 'Accepted'] | ['s020551033', 's089099661'] | [32096.0, 32096.0] | [366.0, 695.0] | [245, 247] |
p02773 | u188305619 | 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 value = input()\n if value not in S:\n S[value] = 1\n else:\n S[value] += 1\nS_largest = max(S.values())\nS_sorted = sorted(S.items(),reverse=True)\nprint(S_sorted)\nans = []\nfor i in range(len(S_sorted)):\n if S_sorted[i][1... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s034381717', 's266034712', 's637899285', 's422033262'] | [52796.0, 35576.0, 49556.0, 50228.0] | [727.0, 420.0, 684.0, 511.0] | [438, 211, 422, 442] |
p02773 | u188745744 | 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())\nlistA = []\nfor i in range(N):\n listA.append(input())\nc = collections.Counter(listA)\nc = c.most_common()\nmax_number = c[0][1]\nprint(c[0][0])\nA = len(c)\nfor i in range(1,A):\n if max_number == c[i][1]:\n print(c[i][0])\n else:\n exit()', 'import colle... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s350358254', 's939068415', 's804875926'] | [45036.0, 45120.0, 45044.0] | [559.0, 565.0, 820.0] | [288, 279, 359] |
p02773 | u189188797 | 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=[]\nansl=[]\nfor i in range(n):\n s.append(input())\ncounter = Counter(s)\nmax=counter.most_common(1)[0][1]\nfor w in counter.most_common():\n if w[1]==max:\n ansl.append(w[0])\nansl.sort()\nfor i in range(len(ansl)):\n print(ansl[i])', 'from collections import Counter\nn=int(input()... | ['Runtime Error', 'Accepted'] | ['s194066369', 's394653330'] | [17056.0, 45032.0] | [290.0, 833.0] | [256, 288] |
p02773 | u190167135 | 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\ncharnums=defaultdict(int)\nN=int(input())\nfor _ in range(N):\n charnums[input()]+=1\nfor key,value in charnums.items():\n if value==max(charnums.values()):\n print(key)', 'from collections import defaultdict\ncharnums=defaultdict(int)\nN=int(input())\nfor _ in range(... | ['Wrong Answer', 'Accepted'] | ['s894737940', 's096780730'] | [35652.0, 35960.0] | [2206.0, 482.0] | [212, 265] |
p02773 | u193927973 | 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 _ in range(N):\n S.append(input())\n \nimport collections\n\nc=collections.Counter(S)\nvl=list(c.values())\nmv=max(vl)\n\nans=[]\nfor k, v in c.items():\n if v==mv:\n ans.append(k)\n else:\n break\nans.sort()\n[print(a) for a in ans]\n ', 'N=int(input())\nS=[]\nfor _ in range(N):\... | ['Wrong Answer', 'Accepted'] | ['s699813080', 's790897528'] | [35980.0, 50224.0] | [682.0, 704.0] | [254, 475] |
p02773 | u194228880 | 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. | ["sz = int(input(''))\nary = []\nfor i in range(0,sz):\n s = input()\n ary.append(s)\n\nmap = {}\nfor w in ary:\n if not w in map:\n map[w] = 1\n else:\n map[w] +=1\n\nmax = 0\nmaxes = []\nfor k,v in map.items():\n if v > max:\n max = v\n\nfor k,v in map.items():\n if v == max:\n maxes.append(k)\n\nfo... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s253076431', 's807052974', 's301189221'] | [35220.0, 35220.0, 35220.0] | [571.0, 635.0, 684.0] | [319, 326, 327] |
p02773 | u201928947 | 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 = sorted(s)\nmax_count = 1\ncount = 1\nans = []\nfor i in range(n-1):\n if s[i] == s[i+1]:\n count += 1\n if count == max_count:\n ans.append(s[i])\n if count > max_count:\n max_count = count\n else:\n count = 1\n if max_c... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s533099345', 's547819632', 's628787630', 's857170918', 's907797653'] | [21540.0, 2940.0, 2940.0, 19336.0, 21548.0] | [652.0, 17.0, 17.0, 484.0, 669.0] | [435, 249, 249, 366, 454] |
p02773 | u201986772 | 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 i in range(n)]\ndick=Counter(s)\ndick=dick.most_common()\nprint(dick)\n#print(dick.values())\np=dick[0][1]\n\ns=[]\nfor k,i in dick:\n if i==p:\n s.append(k)\n else:\n break\nss=sorted(s)\nfor i in ss:\n print(i)', 'from collections import Co... | ['Wrong Answer', 'Accepted'] | ['s643933710', 's919105863'] | [45032.0, 45040.0] | [772.0, 770.0] | [270, 271] |
p02773 | u204208382 | 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())\ninfo = []\nfor i in range(n):\n info.append(input())\n\ninfo.sort()\n\nans = [info[0]]\nrecord = 1\ntem_record = 1\nfor i in range(n-1):\n if info[i] == info[i+1]:\n tem_record += 1\n else:\n if tem_record > record:\n record = tem_record\n ans = [info[i]]... | ['Wrong Answer', 'Accepted'] | ['s450172385', 's470581217'] | [20680.0, 20680.0] | [613.0, 620.0] | [503, 726] |
p02773 | u204616996 | 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\ninput = sys.stdin.readline\nN=int(input())\nfrom collections import defaultdict\nd = defaultdict(int)\nfor i in range(N):\n if i!=N-1:\n S=input()[:-1]\n else:\n S=input()\n d[S]+=1\nmax_k_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]\nmax_k_list.sort()\nfor a in max_k_list:\n p... | ['Wrong Answer', 'Accepted'] | ['s045025523', 's074052536'] | [32488.0, 21448.0] | [2104.0, 648.0] | [311, 261] |
p02773 | u205936263 | 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)]\n\nhash = {}\nfor i in range(N):\n if S[i] in hash:\n hash[S[i]] += 1\n else:\n hash[S[i]] = 1\n\nmax_value = max(hash.values())\n\nresult = {}\nfor i in hash.keys():\n if hash[i] == max_value:\n result[hash[i]] = True\n\nfor key in sorte... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s578878033', 's726646888', 's756863341', 's709376551'] | [35220.0, 35220.0, 35220.0, 53520.0] | [665.0, 476.0, 402.0, 703.0] | [331, 334, 334, 333] |
p02773 | u207137484 | 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())\nmy_dic={}\nfor i in range(n):\n\tk = input()\n\tif k in my_dic:\n\t\tmy_dic[k]+=1\n\telse:\n\t\tmy_dic[k]=1\n\nmax = max(my_dic.values())\nfor i in range(max,0,-1):\n\tkeys = [k for k, v in my_dic.items() if v == i]\n\tkeys.sort()\n\tfor i in range(len(keys)):\n\t\tprint(keys[i])', 'n = int(input())... | ['Wrong Answer', 'Accepted'] | ['s758201790', 's160285519'] | [32096.0, 32096.0] | [730.0, 712.0] | [272, 244] |
p02773 | u207799478 | 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 math\n\n\ndef readints():\n return list(map(int, input().split()))\n\n\nn = int(input())\ns = [input() for i in range(n)]\n# print(s)\ns.sort()\n# print(s)\nss = [i for i in s if s.count(i) > 1]\nprint(ss)\n', 'def readints():\n return list(map(int, input().split()))\n\n\nn = int(input())\ns = [input() f... | ['Wrong Answer', 'Accepted'] | ['s991646297', 's429574796'] | [18820.0, 20676.0] | [2108.0, 732.0] | [203, 419] |
p02773 | u208464243 | 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_a = [input() for i in range(N)]\ndict_a = collections.Counter(list_a)\n\n\nlist_ans = []\n\nlist_ans.append(dict_a.most_common()[0][0])\nwhile True:\n if dict_a.most_common()[0][1] == dict_a.most_common()[i][1]:\n list_ans.append(dict_a.most_common()[i][0])\n ... | ['Runtime Error', 'Accepted'] | ['s948909353', 's407499122'] | [45032.0, 45712.0] | [516.0, 766.0] | [403, 301] |
p02773 | u210543511 | 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())\nSs = {}\nfor _ in range(N):\n s = input()\n if s in Ss:\n Ss[s] += 1\n else:\n Ss[s] = 1\n\nmax_value = max(Ss.values()) \nmax_keys = [k for k, v in Ss.items() if v == max_value]\nfor k in max_keys:\n print(k)\n', 'N = int(input())\nSs = {}\nfor _ in range(N):\n s = input()\n if s in Ss... | ['Wrong Answer', 'Accepted'] | ['s427739727', 's739875646'] | [32096.0, 32988.0] | [498.0, 708.0] | [242, 252] |
p02773 | u210827208 | 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 i in range(n):\n s=input()\n if s not in d.keys():\n d[s]=-1\n else:\n d[s]-=1\n\na=sorted(d.items(),key=lambda x:x[0])\nfor k,v in a:\n if v!=a[0][1]:\n break\n print(k)', 'n=int(input())\nd=dict()\nfor i in range(n):\n s=input()\n if s not in d... | ['Wrong Answer', 'Accepted'] | ['s662961061', 's969758571'] | [46556.0, 59228.0] | [791.0, 928.0] | [223, 230] |
p02773 | u212831449 | 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 s = input()\n if s in d:\n d[s] += 1\n else:\n d[s] = 1\n\nM = max(d.values())\n\nans_list = []\nfor k,v in d.items():\n if v == M:\n ans_list.append(k)\n\nans_list.sort()\nfor i in ans_list:\n print(i', 'import collections\n\nn ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s052042398', 's327048082', 's618403227'] | [3064.0, 59500.0, 32096.0] | [17.0, 714.0, 678.0] | [271, 324, 272] |
p02773 | u215341636 | 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)]\nans = collections.Counter(s)\nans = [j[0] for j in ans.items() if j[1] == max(ans.values())]\nprint('\\n'.join(ans))", "import sys\nfrom collections import Counter\nN = int(sys.stdin.readline())\nS = sys.stdin.read().split()\n\ncount = Counter(S)\... | ['Wrong Answer', 'Accepted'] | ['s500967251', 's551106865'] | [35572.0, 38476.0] | [2105.0, 289.0] | [181, 250] |
p02773 | u218838821 | 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\nS = []\nfor i in range(N):\n S.append([input()][0])\n \nS.sort()\nS_set = list(set(S))\nans = [["" for i in range(2)] for i in range(len(S_set))]\nn = 0\nfor i in range(len(S_set)):\n count = S.count(S_set[i])\n ans[i][0] = S_set[i]\n ans[i][1] = count\n if n < count:\n n = count\n \nf... | ['Wrong Answer', 'Accepted'] | ['s772170985', 's271128421'] | [45372.0, 38492.0] | [2206.0, 446.0] | [369, 266] |
p02773 | u221061152 | 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())\ncnt = {}\nfor _ in range(N):\n s = input()\n if s not in cnt:cnt[s]=0\n cnt[s]+=1\nmax_val = max([cnt[v] for v in cnt])\nl = [v for v in cnt if cnt[v]==max_val]\nsorted(l)\nprint('\\n'.join(l))", "N=int(input())\ncnt = {}\nfor _ in range(N):\n s = input()\n if s not in cnt:cnt[s]=0\n cnt[s]+=1\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s001069960', 's709356467', 's171742838'] | [34140.0, 34140.0, 34140.0] | [599.0, 461.0, 701.0] | [202, 192, 202] |
p02773 | u221537793 | 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)]\ndic = dict()\nfor s in S:\n if s in dic:\n dic[s] += 1\n else:\n dic[s] = 1\nscore_sorted = sorted(dic.items(), key=lambda x: -x[1])\ndic_sorted = sorted(score_sorted, key=lambda x: x[0])\nm = score_sorted[0][1]\nfor k,v in dic_sorted:\n if v =... | ['Wrong Answer', 'Accepted'] | ['s401979414', 's921687199'] | [49680.0, 48908.0] | [705.0, 695.0] | [351, 364] |
p02773 | u222668979 | 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)]\n\nscnt = Counter(s)\ncnt = max(s.values())\nans = sorted(k for k in scnt if scnt[v] == cnt)\nprint(*ans, sep='\\n')\n\nif n == 4:\n print(n)\n", "n = int(input())\ns = [str(input()) for _ in range(n)]\ns.append('zzzzzzzzzzz')\ns.... | ['Runtime Error', 'Accepted'] | ['s727804214', 's788479661'] | [38832.0, 39100.0] | [266.0, 800.0] | [218, 426] |
p02773 | u227476288 | 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\nSdict = dict()\nfor _ in range(N):\n s = input()\n if s in Sdict:\n Sdict[s] += 1\n else:\n Sdict[s] = 0\n \nprint(Sdict)\nmaxi = 0\nlis = []\nfor k,v in Sdict.itens():\n\tif v > maxi:\n lis = [k]\n maxi = v\n if v == maxi:\n\t\tlis.append(k)\n\nprint(lis... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s187767913', 's264982699', 's093502473'] | [3188.0, 32096.0, 32096.0] | [18.0, 678.0, 652.0] | [303, 326, 328] |
p02773 | u232873434 | 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\nimport pandas as pd\nN = int(input())\nlist = [input() for _ in range(0,N)]\ncounted = Counter(list)\nres= counted.most_common()\n\nres = pd.DataFrame(res)\n[print(i) for i in res[0][res[1] == res[1].max()]]\n', 'from collections import Counter\nimport numpy as np\... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s035835034', 's268907463', 's358492679', 's533568037', 's736077330', 's782276717', 's732518332'] | [13268.0, 22660.0, 45040.0, 21704.0, 45040.0, 59756.0, 45040.0] | [184.0, 335.0, 844.0, 305.0, 711.0, 2107.0, 659.0] | [252, 301, 280, 252, 289, 227, 263] |
p02773 | u235027735 | 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\ns = {}\nfor i in range(n):\n temp = input()\n if temp in s:\n s[temp] += 1\n else:\n s[temp] = 1\n\n\n\nmax_s_val = max(s.value())\nt = [k for k, v in s.items() if v == max_s_val]\nt.sort()\n\nfor i in range(len(t)):\n print(t[i])\n\n', 'n = int(input())\n\ns = {}\nfor i ... | ['Runtime Error', 'Accepted'] | ['s207804459', 's463664498'] | [32096.0, 32096.0] | [361.0, 733.0] | [261, 262] |
p02773 | u237299453 | 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 pandas\n\nn = int(input())\ns = [input() for _ in range(n)]\n\nx = pandas.Series(s)\nlis = x.mode().tolist()\nlis = sort(lis)\nfor i in range(len(lis)):\n print(lis[i])', 'import pandas\n \nn = int(input())\ns = [input() for _ in range(n)]\n \nx = pandas.Series(s)\nlis = x.mode().tolist()\nlis = sort(lis)\nfo... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s247991724', 's425230518', 's096400787'] | [9080.0, 8988.0, 50232.0] | [30.0, 28.0, 200.0] | [167, 169, 324] |
p02773 | u239342230 | 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)]\n\nfrom collections import Counter\n\ncnt_s = Counter(S)\n\nt = max(cnt_s.values())\nkv=cnt_s.items()\nfor k,v in kv:\n if v==t:\n print(k)', 'N=int(input())\nS=[input() for _ in range(N)]\n\nfrom collections import Counter\n\ncnt_s = Counter(S)\n\nt = max(cnt_s... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s135035148', 's191017159', 's723134051'] | [35476.0, 35544.0, 57636.0] | [458.0, 455.0, 840.0] | [184, 179, 281] |
p02773 | u239653493 | 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 _ in range(N):\n S.append(input())\nimport collections\nimport itertools\ncounter = collections.Counter(S)\n\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))\n', 'N=int(input())\nS ... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s365094778', 's629765721', 's738952121', 's802257284', 's852671645', 's899261353', 's988506401', 's995011770'] | [45328.0, 17312.0, 17312.0, 17308.0, 17304.0, 17312.0, 17308.0, 49488.0] | [627.0, 294.0, 298.0, 284.0, 291.0, 302.0, 300.0, 796.0] | [282, 332, 262, 332, 332, 310, 261, 319] |
p02773 | u241939891 | 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\nDi={"":0}\n\nfor i in range(N):\n poll=str(input())\n \n if poll in Di.keys():\n Di[poll] += 1\n else:\n Di[poll] = 1\n\nmaxvalue=0\nmaxkey=[]\n\nfor k in Di.keys():\n\n if Di[k] > maxvalue:\n maxvalue=Di[k]\n maxkey=[]\n maxkey.append(k)\n elif D... | ['Wrong Answer', 'Accepted'] | ['s369345460', 's846721123'] | [32096.0, 42332.0] | [600.0, 882.0] | [374, 422] |
p02773 | u243061947 | 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_list = []\nfor i in range(N):\n S_list.append(input())\n \nsorted(S_list)\nname_list = []\nvote_list = []\ni, j = 0, 0\nwhile i < len(S_list):\n name = S_list[i]\n while j < len(S_list) and S_list[j] == name:\n j += 1\n name_list.append(name)\n vote_list.append(j - i)\n i = j\nmax_vote = ... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s036025650', 's070994474', 's141520680', 's519485912', 's740681434', 's986776711', 's686922048'] | [22144.0, 23848.0, 19328.0, 33416.0, 2940.0, 19336.0, 33796.0] | [578.0, 725.0, 437.0, 696.0, 17.0, 421.0, 697.0] | [399, 404, 395, 423, 426, 395, 435] |
p02773 | u244416763 | 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 = ["" for i in range(n)]\nfor j in range(n):\n s[j] = str(input())\ns.sort()\ncount = [0 for _ in range(len(set(s)))]\nl = 0\nname = list(sorted(set(s)))\nfor k in range(n-1):\n count[l] += 1\n if(s[k] != s[k+1]):\n l += 1\nif(s[-1] == s[-2]):\n count[-1] += 1\nelse:\n count.... | ['Runtime Error', 'Accepted'] | ['s073006478', 's213013875'] | [33220.0, 35144.0] | [863.0, 963.0] | [450, 412] |
p02773 | u244466744 | 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)]\n\ndic = {}\n\nfor i in range(N):\n if S[i] not in dic.keys():\n dic[S[i]] = 1\n \n else:\n dic[S[i]] += 1\n \nmaxim = max(dic.values())\nans = []\n\nfor keys in dic.keys():\n if dic[keys] == maxim:\n ans.append(keys)\n \nans.sort()\n\nfor i in le... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s180401021', 's499228292', 's665842265', 's985795524', 's555562546'] | [38340.0, 38468.0, 38412.0, 38572.0, 38340.0] | [395.0, 304.0, 403.0, 305.0, 472.0] | [321, 311, 316, 315, 328] |
p02773 | u245299791 | 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=[]\nfor i in range(N):\n a.append(input())\nb=list(set(a))\nc=[]\nfor j in range(len(b)):\n c.append(a.count(b[j]))\nd=int(c.count(max(c)))\ne=[]\nfor k in range(d):\n e.append(b[c.index(max(c))])\n b.remove(e[k])\nfor l in range(len(e)):\n print(min(e))\n e.remove(min(e))', 'N=int(input())\na... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s522033834', 's811159660', 's196934777'] | [29076.0, 29076.0, 35216.0] | [2105.0, 2105.0, 652.0] | [282, 227, 252] |
p02773 | u245870380 | 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)]\nc = collections.Counter(S)\nm = max(c.values())\nfor k, v in c.items():\n if m == v:\n print(k)\n', 'import collections\nN = int(input())\nS = [input() for _ in range(N)]\nc = collections.Counter(S)\nprint(c.most_common()[0][0])\n', 'imp... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s197576752', 's323773452', 's798295111'] | [35572.0, 45044.0, 35572.0] | [425.0, 381.0, 618.0] | [170, 124, 222] |
p02773 | u250554058 | 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())\nword = [input() for i in range(n)]\ntest = list([x,0] for x in set(word))\n\nfor i, num in enumerate(test):\n test[i][1] = word.count(num[0])\n\nnum_max = int(max(test, key=lambda x: x[1])[1])\n\nprint('\\n'.join(sorted([num[0] for num in test if(int(num[1] == num_max)))))\n", "n = int(input())\nwo... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s540304551', 's800497389', 's567883597'] | [3060.0, 46856.0, 43468.0] | [17.0, 2109.0, 618.0] | [283, 322, 187] |
p02773 | u254871849 | 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\nn, *s = sys.stdin.read().split()\n\ndef main():\n c = Counter(s)\n m = max(c.values())\n ans = [s for s, c in cnt.items() if c == m]\n print(*sorted(ans), sep='\\n')\n \nif __name__ == '__main__':\n main()", "import sys\nfrom collections import Co... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s089892895', 's271680219', 's680769568'] | [38392.0, 38392.0, 38392.0] | [90.0, 93.0, 344.0] | [263, 261, 261] |
p02773 | u258933429 | 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\n\nnumbers = dict()\nmaxval = 1\nfor val in s:\n if val in numbers:\n if maxval == numbers[val]:\n maxval = maxval + 1\n numbers[val] += 1\n else:\n numbers[val] = 1\n\n[print(kv[0]) for kv in numbers.items() i... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s780226463', 's857241164', 's931199351', 's584467740'] | [35220.0, 35220.0, 40464.0, 35220.0] | [533.0, 2105.0, 661.0, 655.0] | [321, 258, 363, 354] |
p02773 | u260216890 | 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\nfrom collections import defaultdict\nd = defaultdict(lambda:0)\n\nfor k in S:\n d[str(k)]+=1\n\ndmax=max(d.value())\nansn=dmax\nans=[]\nfor i in set(S):\n if d[i]==ansn:\n ans.append(i)\n\nans=sorted(ans)\nfor i in range(len(ans)):\n p... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s897507718', 's947752630', 's521977733'] | [35472.0, 49776.0, 44304.0] | [393.0, 431.0, 789.0] | [311, 281, 306] |
p02773 | u262597910 | 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)]\nc = collections.Counter(s)\nc = c.most_common()\nbase = c[0][1]\nfor i in range(len(c)):\n if (c[i][1]==base):\n print(c[i][0])\n else:\n exit()', 'import collections\nn = int(input())\ns = [input() for _ in range(n)]\nc = coll... | ['Wrong Answer', 'Accepted'] | ['s265408392', 's336772395'] | [45040.0, 45036.0] | [552.0, 676.0] | [225, 272] |
p02773 | u266569040 | 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 i in range(N)]\n\nc_dic = dict(collections.Counter(S))\n\n#for value ,key in c_dic.items():\n\ndic2 = dict(sorted(c_dic.items(), key=lambda x:x[0]))\ndic2 = dict(sorted(dic2.items(), key=lambda x:x[1]))\nm_dic2 = max(dic2.values())\nprint(c_dic, dic2,m_dic2)\n\... | ['Wrong Answer', 'Accepted'] | ['s758785730', 's815165197'] | [80360.0, 47636.0] | [950.0, 732.0] | [456, 380] |
p02773 | u267029978 | 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())\ntest = []\nname = {}\nnum = []\nfor i in range(N):\n add = str(input())\n test.append(add)\n#print(test)\n\nfor i in test:\n if i in name:\n name[i] += 1\n else:\n name[i] =1\n#print(name)\n\nfor i in name:\n num.append(name[i])\n \n#print(num)\n#print(max(num))\n\nword = []\nfor i in na... | ['Wrong Answer', 'Accepted'] | ['s395023877', 's483230821'] | [35216.0, 35220.0] | [2105.0, 743.0] | [368, 404] |
p02773 | u267300160 | 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_list = [input() for i in range(N)]\nC = collections.Counter(S_list)\nL = C.most_common()\nmax_ = L[0][1]\nans = []\n#print("========")\nfor i in L:\n if i[1] == max_:\n ans.append(i[0])\n else:\n exit()\nans.sort()\nfor i in ans:\n print(i)\n', 'import co... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s262880575', 's869267101', 's906044757'] | [47660.0, 46888.0, 47640.0] | [706.0, 528.0, 689.0] | [289, 219, 288] |
p02773 | u269235541 | 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 _ in range(n)]\nc = Counter(s)\nm = 0\nfor v in c.values():\n\tm = max(m, v)\nprint(c.items())\nans = []\nfor k, v in c.items():\n\tif v == m:\n\t\tans.append(k)\nans.sort()\nprint(*ans, sep="\\n")', 'N = int(input())\nS = []\nfor i in range(N):\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s116287467', 's579771966', 's058724785'] | [50032.0, 54848.0, 35904.0] | [798.0, 831.0, 631.0] | [247, 370, 230] |
p02773 | u272075541 | 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 _ in range(n)]\n\nscount = Counter(s)\nscsort = scount.most_common()\nx = scsort[0][1]\nfor i in scsort:\n if i[1] != x:\n break\n print(i[0])', 'from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\n\nscoun... | ['Wrong Answer', 'Accepted'] | ['s021129961', 's219582052'] | [46880.0, 49404.0] | [536.0, 843.0] | [213, 266] |
p02773 | u272150741 | 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())\na = [s for s in input().split()]\n\nc = Counter(a)\nlist = c.most_common()\nmax = list[0][1]\n\nans = []\nfor i, j in list:\n if j == max:\n ans.append(i)\n else:\n break\n\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])', 'from collec... | ['Wrong Answer', 'Accepted'] | ['s615493085', 's656332071'] | [3316.0, 47668.0] | [21.0, 746.0] | [285, 284] |
p02773 | u272279638 | 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())\nli=map(string,input().split())\ndic={}\nfor k in li:\n dic[k]+=1\nmax_dic= max(dic)\nprint(max_dic)', 'N = int(input())\nD = {}\nfor _ in range(N):\n S = input()\n if S not in D: D[S]=0\n D[S]+=1\n\nM = max(D.values())\nfor S in sorted(list(D)):\n if D[S]==M:\n print(S)\n\n\n\n'] | ['Runtime Error', 'Accepted'] | ['s570178413', 's777930339'] | [3060.0, 33116.0] | [17.0, 684.0] | [110, 178] |
p02773 | u273262677 | 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. | ["\nr=[]\nimport sys\n\nn = int(sys.stdin.readline())\nsn = sys.stdin.read().split()\n\nd={}\nfor i in l:\n if i in d:\n d[i]+=1\n else:\n d[i]=1\n\nm = max(d.values())\nfor key,value in d.items():\n if value==m:\n r.append(key)\nsorted_r = sorted(r)\nprint(*sorted_r,sep='\\n')", "\nr=[]\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s077972117', 's432355163', 's694922283'] | [19860.0, 19884.0, 38476.0] | [37.0, 37.0, 354.0] | [286, 286, 217] |
p02773 | u277104886 | 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 = list(input() for _ in range(n))\nls = Counter(s).most_common()\na = []\na.append(ls[0][0])\nfor i in range(1, len(ls)):\n if ls[i][1] == ls[0][1]:\n a.append(ls[i][0])\nfor i in a:\n print(i)', 'from collections import Counter\nn = int(input())\ns = ... | ['Wrong Answer', 'Accepted'] | ['s649915744', 's173616889'] | [45052.0, 45052.0] | [606.0, 746.0] | [249, 257] |
p02773 | u281610856 | 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())\ndict = {}\nmx = 0\nfor i in range(n):\n s = input()\n if s not in dict:\n dict[s] = 0\n dict[s] += 1\n mx = max(mx, dict[s])\nprint(dict)\nprint(mx)\nans = []\nfor s in dict:\n if dict[s] == mx:\n ans.append(s)\nans.sort()\nfor s in ans:\n print(s)', 'import collectio... | ['Wrong Answer', 'Accepted'] | ['s806108659', 's440270431'] | [37844.0, 59504.0] | [806.0, 818.0] | [281, 376] |
p02773 | u281796054 | 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 = list()\nfor _ in range(n):\n List.append(input())\ns=collections.Counter(List)\ns_inv={v:k for k,v in s.items()}\nprint(s_inv[max(s.values())])', 'import collections\nn = int(input())\nl1 = list()\nfor i in range(n):\n l1.append(input())\nc = collections.Counter(l1)\nm =... | ['Wrong Answer', 'Accepted'] | ['s708017134', 's931231321'] | [35572.0, 46104.0] | [350.0, 821.0] | [182, 200] |
p02773 | u283285729 | 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())\nb = {}\nfor i in range(n):\n temp = input()\n if temp not in b:\n b[temp] = 1\n else:\n b[temp] += 1\n\nlist1 = sorted(b.items(), key=lambda x: x[1])\nlist1.reverse()\n\na = 0\nlist2=[]\nwhile list1[0][1] == list1[a][1]:\n list2.append(list1[a][0])\n list2.sort()\n a ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s333045742', 's534943253', 's079941392'] | [43228.0, 43228.0, 45788.0] | [2105.0, 2106.0, 762.0] | [320, 337, 363] |
p02773 | u284363684 | 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\n# input\nN = int(input())\nS = []\ns_append = S.append\n\nfor i in range(N):\n s = input()\n s_append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nprinted_items = []\nappend = printed_items.append\nfor i in s_counter.items():\n if s[1] == max and s[0] no... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s326275328', 's412067627', 's572789336', 's631711682', 's679737505', 's769182986', 's060979046'] | [35572.0, 35568.0, 35572.0, 35572.0, 35572.0, 35568.0, 35568.0] | [368.0, 356.0, 2105.0, 465.0, 2105.0, 2105.0, 691.0] | [367, 264, 365, 320, 367, 357, 343] |
p02773 | u288001809 | 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. | ['case = int(input())\nl = [""] * case\nfor i in range(case):\n l[i] = input()\n\nfor str in sorted(set(l)):\n print(str)', 'case = int(input())\nl = [""] * case\nfor i in range(case):\n l[i] = input()\n\nfor str in set(l):\n print(str)', 'import collections\n\ncase = int(input())\nl = [""] * case\nfor i in range(c... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s057729290', 's553340582', 's556390611', 's586621493', 's814674489'] | [28904.0, 28904.0, 59484.0, 59488.0, 59492.0] | [575.0, 410.0, 714.0, 953.0, 945.0] | [115, 107, 337, 361, 431] |
p02773 | u289102924 | 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 = []\nans = []\n\nfor i in range(n):\n s.append(input())\n\nc = Counter(s)\nc_s = c.most_common()\nm = c.most_common()[0][1]\nprint(c_s)\nprint(m)\n\nfor j in range(len(c_s)):\n if c_s[j][1] != m:\n break\n else:\n ans.append(c_s[j][0])\n\nan... | ['Wrong Answer', 'Accepted'] | ['s220316385', 's714468063'] | [59376.0, 59376.0] | [920.0, 829.0] | [333, 313] |
p02773 | u291988695 | 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())\nl=[""]*i\nfor k in range(i):\n l[k]=input()\nl.sort()\nmaxi=0\nkosu=0\nfor k in l:\n kosu+=1\n if kosu=maxi:\n li.append(k)\n elif kosu>maxi:\n li.clear()\n li.append(k)\nprint(*li)', 'i=int(input())\nl=[""]*i\nfor k in range(i):\n l[k]=input()\nl.sort()\nmaxi=0\nkosu=0\nli=[]\nsubk=""\n... | ['Runtime Error', 'Accepted'] | ['s903024223', 's878162470'] | [2940.0, 20636.0] | [17.0, 646.0] | [196, 274] |
p02773 | u293838812 | 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())\n \ncurrent_max = 0\ncurrent = []\ntable = {}\n \nfor i in range(n):\n s = input().rstrip()\n table[s] = table[s] + 1 if table.get(s) is not None else 0\n if table[s] > current_max:\n current = [s]\n current_max = table[s]\n elif table[s] == current_max:\n cu... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s739675877', 's884573206', 's323082017'] | [47364.0, 46468.0, 45788.0] | [860.0, 679.0, 740.0] | [556, 494, 397] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.