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 | u297802287 | 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 = []\nfor i in range(n):\n a.append(input())\nb = Counter(a)\nfor k, v in b.items():\n if v == max(b.values()):\n print(k)\n', 'b = {}\nfor _ in range(int(input())): s=input(); b[s]=b.get(s,0)+1\nprint(*sorted(k for k in b if b[k]==max(b.values())))'... | ['Wrong Answer', 'Time Limit Exceeded', 'Accepted'] | ['s206407458', 's850659768', 's982394429'] | [38908.0, 35308.0, 48596.0] | [2206.0, 2206.0, 572.0] | [182, 119, 196] |
p02773 | u299791633 | 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\ncount = input()\n\nl = []\nfor i in range(int(count)):\n l.append(input())\nc = collections.Counter(l)\n#print(l)\n#print(c)\n#print(c.most_common()[0][1])\nmax_count = c.most_common()[0][1]\nfor i in c.most_common():\n if i[1] != max_count:\n exit()\n print(i[0])\n\n', 'import c... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s158039364', 's192566887', 's299125128'] | [46836.0, 45036.0, 45040.0] | [608.0, 823.0, 751.0] | [289, 370, 357] |
p02773 | u301257907 | 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\nhash = {}\nfor i in range(N):\n\tkey = input()\n\tif key in hash:\n\t\thash[key] += 1\n\telse:\n\t\thash[key] = 1\n \nmax = 0\nresults = []\nfor i, v in hash.items():\n\tif max == v:\n\t\tresults.append(i)\n\telif max < v:\n\t\tresults = [i]\n \nfor i in results:\n\tprint(i)\n', 'N =... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s222169877', 's385718377', 's589680898', 's310443784'] | [32092.0, 32096.0, 3064.0, 32096.0] | [430.0, 517.0, 17.0, 632.0] | [277, 287, 278, 295] |
p02773 | u301624971 | 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())\nS = [input() for i in range(N)]\nC = dict()\n\n\nfor i in range(N):\n a = input()\n if(a not in C.keys()):\n C[a] = 1\n else:\n val = C[a]\n C[a] = val + 1\n\nmaxv=0\nfor i in C.values():\n if(i > maxv):\n maxv=i\n\nans = sorted(C.items())\nfor i in ans:\n ... | ['Runtime Error', 'Accepted'] | ['s235260026', 's454530165'] | [17048.0, 48908.0] | [299.0, 650.0] | [335, 548] |
p02773 | u301984327 | 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())\n\n\nd = collections.defaultdict(lambda:0)\n\nfor i in range(n):\n s = input()\n d[s] += 1\n\nd = dict(d)\n\na = collections.Counter(d).most_common()\n\nmost = 0\n\nfor k, v in a:\n if most <= v:\n most = v\n print(k)\n else:\n break', 'import co... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s073458403', 's544120391', 's570602605'] | [57604.0, 41944.0, 57704.0] | [660.0, 610.0, 855.0] | [283, 277, 326] |
p02773 | u303384315 | 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)]\nc_sort = collections.Counter(s).most_common()\nlist_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]\nfor i in list_most:\n print(i)', 'import collections\n\nn = int(input())\ns = [input() for i in range(n)]\n... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s075103180', 's157067265', 's215425892', 's511312890', 's438947667'] | [45040.0, 45040.0, 2940.0, 17504.0, 45040.0] | [566.0, 542.0, 17.0, 58.0, 703.0] | [234, 235, 319, 287, 242] |
p02773 | u303739137 | 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 = [str(input()) for i in range(n)]\n\nset_key = set(s)\ndic = dict(set_key, [0]*len(set_key))\n\nfor c in s:\n dic[c] += 1\n \nn_max = max(dic.values())\nstr_argmax = dic.keys()[dic.values() == n_max]\nstr_argmax.sort()\n\nfor i in str_argmax:\n print(i)', 'n = int(input())\n \ns = [str(inpu... | ['Runtime Error', 'Accepted'] | ['s666485339', 's785745185'] | [29076.0, 46092.0] | [335.0, 809.0] | [265, 245] |
p02773 | u306412379 | 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)]\nlist1 = []\ncount = 1\nfor s in S:\n c = S.count(s)\n if c == count:\n list1.append(s)\n \n elif c > count:\n list1 = [s]\n count = c\n S.remove(s)\n \n \nif len(list1) == 1:\n print(list1[0])\nelif S.count(list1[0]) < S.count(list1[1]):\n list... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s717380167', 's907905955', 's429179914'] | [23400.0, 23392.0, 35300.0] | [2206.0, 2206.0, 454.0] | [380, 411, 201] |
p02773 | u307418002 | 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\ndef main():\n n =int( input())\n\n cnt=dict()\n for _ in range(n):\n s=input()\n if s in cnt:\n cnt[s]+=1\n else :\n cnt[s]=1\n #print(cnt)\n \n a = [k for k, v in cnt.items() if v == max(cnt.values())]\n for elm in a :\n pri... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s403046787', 's450033753', 's524273607', 's129143142'] | [32480.0, 32480.0, 34524.0, 32096.0] | [2105.0, 2104.0, 842.0, 606.0] | [319, 347, 619, 640] |
p02773 | u307622233 | 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_list = []\n\nfor count in range(n):\n str_list.append(input())\n\nlist_set = set(str_list)\n\n\n# print(str_list)\n# print(list_set)\n\n\n# print(str_list)\n# str_list = filter(lambda txt: txt != set_txt, str_list)\n# print(str_list)\n# print('!!!!!')\n\n\nmax = 0\nans = []\nfor set_txt in li... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s002880716', 's709094653', 's303040256'] | [149860.0, 29076.0, 32092.0] | [2105.0, 2105.0, 639.0] | [706, 355, 335] |
p02773 | u308919961 | 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 operator import itemgetter\nimport datetime\n\nn = int(input())\nsn = dict()\n\nfor i in range(n):\n s = input()\n if(s in sn):\n sn[s] += 1\n else:\n sn[s] = 1\n\nsn = sorted(sn.items(), key=lambda x:x[1], reverse=True)\n#print(sn)\n\nmax_val = max(dict(sn).values())\n\nfor si in sn:\n ... | ['Wrong Answer', 'Accepted'] | ['s477145718', 's598342523'] | [54224.0, 68688.0] | [628.0, 1006.0] | [371, 365] |
p02773 | u309120194 | 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\n\nN = int(input())\nS = [input() for _ in range(N)]\n \nT = sorted(set(S))\nt = len(T)\nl = [S.count(T[i]) for i in range(t)]\n \nfor i in range(t):\n if l[i] == max(l):\n print(T[i])', 'N = int(input())\nS = [input() for _ in range(N)]\n\nT = list(set(S))\nt = len(T)\nl =... | ['Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s318132009', 's323972909', 's196261648'] | [35720.0, 35748.0, 38444.0] | [2206.0, 2206.0, 480.0] | [216, 191, 578] |
p02773 | u309423187 | 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)]\nans = []\n\nc = Counter(s)\nmax_count = max(c.values())\n\nfor k, v in c.items():\n if v == max_count:\n ans.append(k)\nans.sort()\nprint('\\\uffffn'.join(ans))\n", "from collections import Counter\n\nn = int(input())\ns = [... | ['Wrong Answer', 'Accepted'] | ['s456153258', 's079896656'] | [40052.0, 35952.0] | [522.0, 523.0] | [239, 239] |
p02773 | u311113280 | 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)]\nmaxA=0\nB=[]\nfor i in set(S):\n A=(S.count(i))\n if A > maxA:\n maxA=A\n B = [i]\n if A == maxA and i not in B:\n B.append(i)\n[print(j) for j in B]', 'N=int(input())\nS = [input() for _ in range(N)]\nimport collections \nC=collections.Counter(S)\nmaxC=max... | ['Wrong Answer', 'Accepted'] | ['s311156036', 's918561341'] | [29076.0, 35980.0] | [2105.0, 630.0] | [199, 191] |
p02773 | u312025627 | 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 i in range(N)]\n from collections import Counter\n c = Counter(S)\n cnt = c.most_common()[0][1]\n for s in c.most_common():\n # print(s)\n if s[1] == cnt:\n print(s[0])\n\n\nif __name__ == '__main__':\n main()\n", "def mai... | ['Wrong Answer', 'Accepted'] | ['s059525328', 's592016667'] | [46892.0, 45068.0] | [551.0, 793.0] | [293, 361] |
p02773 | u312078744 | 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())\ndata = [0] * N\n\n\nfor i in range(0, N):\n data[i] = input()\n\ncount = Counter(data)\n\n\nmost = count.most_common()\nmostNum = most[0][1]\nprint(count) # counter_object\nprint(most) # list;[(val,num),(val,num),/////]\nprint(mostNum) # number of most\n\n... | ['Wrong Answer', 'Accepted'] | ['s127922061', 's995740579'] | [72096.0, 46856.0] | [1084.0, 828.0] | [439, 446] |
p02773 | u314877220 | 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())\nwords = [input() for i in range(n)]\nwords_set = set(words)\ncounter = [0 for j in range(int(len(words_set)))]\nwords_dic = {}\n\nwords_list = list(zip(words_set, counter))\nwords_dic = dict(words_list)\n\nfor k in words:\n words_dic[k] = words_dic[k] + 1\nfin = [ii[0] for ii in words_dic.items()... | ['Wrong Answer', 'Accepted'] | ['s895353382', 's760783598'] | [65548.0, 45040.0] | [2106.0, 690.0] | [382, 288] |
p02773 | u317779196 | 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)\nl = [i for i,v in c.items() if v == max(c.values())]\nfor j in l:\n print(j)', 'import collections\nn = int(input())\ns = [input() for _ in range(n)]\nc = collections.Counter(s)\nmv = c.most_common()[0][1]\nl = [i for... | ['Wrong Answer', 'Accepted'] | ['s319693355', 's481513119'] | [35572.0, 45116.0] | [2105.0, 651.0] | [171, 195] |
p02773 | u318662224 | 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. | ['d = {}\nfor _ 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())\nfor s in sorted(k for k in d if d[k] == m):\n print(s)', 'from collections import Counter\n\nN = int(input())\n\nd = {}\nfor _ in range(N):\n S = input()\n if S in d:\n d... | ['Runtime Error', 'Accepted'] | ['s238130520', 's936696655'] | [9108.0, 35612.0] | [26.0, 471.0] | [179, 231] |
p02773 | u319345083 | 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 = [input() for _ in range(n)]\nmost_list = []\ncounter_dict = {}\nfor s in s_list:\n if s in counter_dict:\n counter_dict[s] += 1\n else:\n counter_dict[s] = 1\n\nsorted_counter = sorted(counter_dict.items(), key=lambda x: x[1], reverse=True)\nans = []\nmax_num = sorted_co... | ['Wrong Answer', 'Accepted'] | ['s006080069', 's427654592'] | [49936.0, 49932.0] | [473.0, 667.0] | [439, 450] |
p02773 | u319589470 | 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 = {}\nans = []\nfor i in range(n):\n s = input()\n if s not in d:\n d[s] = 1\n else:\n d[s] += 1\nd_sorted = sorted(d.items(), key=lambda x:x[1])\nd = list(d.items())\nscore = d[-1][1]\nfor i in range(len(d)):\n if score == d[i][1]:\n ans.append(d[i][0])\nans.sort()\nfor i in range(le... | ['Wrong Answer', 'Accepted'] | ['s411436242', 's760261141'] | [55900.0, 43228.0] | [778.0, 745.0] | [326, 308] |
p02773 | u323859575 | 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 = [''] * n\nfor i in range(n):\n print(i)\n s[i] = input()\n\ncs = collections.Counter(s)\nmcs = cs.most_common()\ncnt = mcs[0][1]\n\nfcs = [i[0] for i in cs.items() if i[1] == cnt]\nans = sorted(fcs)\nfor s in ans:\n print(s)\n", "import collections\n\nn = int(input... | ['Wrong Answer', 'Accepted'] | ['s218574998', 's738689962'] | [51840.0, 51872.0] | [901.0, 463.0] | [263, 250] |
p02773 | u327532412 | 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 = Counter(input() for _ in range(N))\nm = max(S.values())\nfor v in sorted(s for k, v in S.items() if k == m):\n\tprint(v)', 'from collections import Counter\nN = int(input())\nS = Counter(input() for _ in range(N))\nm = max(S.values())\nfor v in sorted(s for k, v ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s443113228', 's887646916', 's691205421'] | [32480.0, 32480.0, 32480.0] | [331.0, 332.0, 659.0] | [169, 169, 169] |
p02773 | u327721369 | 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())\nst=[]\nl=[0 for i in range(n)]\nfor i in range(n):\n st.append(input())\nfor i in range(n):\n if st[i] not in l:\n l[i]+=1\n if i==n-1:break\n for j in range(i+1,n):\n if st[i]==st[j]:\n l[i]+=1\nm=max(l)\nif m==1:\n for i in range(n):\n print(st[i])\nels... | ['Wrong Answer', 'Accepted'] | ['s182131075', 's552424402'] | [20384.0, 35208.0] | [2105.0, 861.0] | [431, 288] |
p02773 | u328755070 | 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)]\nS.sort()\n\nT = [[S[0]]]\nfor i in S[1:N]:\n if i == T[-1][-1]:\n T[-1].append(i)\n else:\n T.append([i])\nT.sort(key=lambda x: len(x))\nU = []\n\nU.append(T[-1][0])\nc = -2\nfor i in T[0:len(T)-1]:\n if len(i) == len(T[-1]):\n U.append(i[0])\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s600282932', 's503932071'] | [42020.0, 42020.0] | [815.0, 788.0] | [341, 308] |
p02773 | u329407311 | 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())\narr = []\n\nfor i in range(N):\n a = input()\n arr.append(a)\n \narr.sort()\narr.append("")\n\na = [[] for i in range(N)]\ncnt = 0\n\nfor i in range(1,N+1):\n \n if arr[0] != arr[1] and i == 1:\n a[0].append(arr[0])\n \n if arr[i] == arr[i-1]:\n cnt += 1\n else:\n if cnt > 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s039578086', 's608928030'] | [34888.0, 35016.0] | [735.0, 897.0] | [517, 597] |
p02773 | u329785342 | 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())\n\nchars = [input() for _ in range(N)]\nchar_counts = collections.Counter(chars)\n\nfor char in sorted(char_counts.most_common()):\n print(char[0])', 'import collections\n\nN = int(input())\n\nchars = [input() for _ in range(N)]\nchar_counts = collections.Counter(chars)\n\nmax_... | ['Wrong Answer', 'Accepted'] | ['s981081471', 's023712868'] | [47636.0, 35572.0] | [819.0, 606.0] | [179, 289] |
p02773 | u330661451 | 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\ndef main():\n n = int(input())\n s = [input() for _ in range(n)]\n C = Counter(s)\n cl = C.most_common()\n print(cl)\n mx = cl[0][1]\n ans = []\n for c in cl:\n if (c[1] == mx):\n ans.append(c[0])\n else:\n break\n ans.s... | ['Wrong Answer', 'Accepted'] | ['s043909110', 's360907760'] | [55168.0, 35936.0] | [805.0, 541.0] | [383, 311] |
p02773 | u334365640 | 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())\nm = {}\nfor i in n:\n s = input()\n if s in m:\n m[s] += 1\n else:\n m[s] = 1\n \nmaxim = max(m.values())\nmySet = set(key if value == maxim for key, value in m.items())\nfor i in mySet:\n print(i)\n ', 'n = int(input())\nm = {}\nfor i in range(n):\n s = input()\n if s in m:\n ... | ['Runtime Error', 'Accepted'] | ['s466568163', 's367260294'] | [2940.0, 44124.0] | [17.0, 665.0] | [219, 243] |
p02773 | u337626942 | 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())\nl=[input() for i in range(N)]\nc=collections.Counter(l)\nc=c.most_common()\nl2=[]\n \nM=c.[0][1]\nfor i in range(N):\n if c.[i][1]==M:\n l2.append(c.[i][0])\n else:\n break\nl2.sort()\nfor j in range(len(l2)):\n print(l2[j])', 'import collections\nN=int(input... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s009538020', 's771595718', 's505569037'] | [2940.0, 2940.0, 32096.0] | [17.0, 17.0, 686.0] | [268, 273, 259] |
p02773 | u337713602 | 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 i in range(n):\n t = input()\n if t in d.keys():\n d[t] += 0\n else:\n d[t] = 0\n\ns = sorted(list(set(d.keys())))\nm = max(d.values())\n\nfor s in s:\n if d[s] == m:\n print(s)', 'n = int(input())\n\nd = {}\nfor i in range(n):\n t = input()\n if t in d.keys():\n d[t]... | ['Wrong Answer', 'Accepted'] | ['s936499830', 's046303449'] | [42332.0, 42460.0] | [688.0, 720.0] | [207, 208] |
p02773 | u339443002 | 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\nn = int(input())\ncounts = defaultdict(int)\n\nfor _ in range(n):\n counts[input().strip()] += 1\n\nvec = sorted([(-value, key) in counts.items()], reverse=True)\nbest = vec[0][0]\nfor v, s in vec:\n if v != best:\n break\n print(s)\n', 'from collections import d... | ['Runtime Error', 'Accepted'] | ['s672560496', 's355850015'] | [32480.0, 46880.0] | [424.0, 1055.0] | [275, 305] |
p02773 | u344030307 | 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\nd = {}\n\nfor i in range(n):\n a = input()\n if a not in d:\n d[a] = 1\n else:\n d[a] += 1\n\ndsorted = sorted(d, key=lambda x:x[1])\n\ncnt = 0\nfor i in dsorted:\n print(i)\n cnt += 1\n if cnt == 2:\n break', 'n = int(input())\n\nd = {}\n\nfor i in range(n):\n a = input()\n if ... | ['Runtime Error', 'Accepted'] | ['s164670362', 's473381401'] | [35448.0, 48384.0] | [288.0, 497.0] | [225, 320] |
p02773 | u344813796 | 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 _ in range(n)]\nimport collections\ncnt=collections.Counter(s)\ncntt=cnt.most_common()\nmaxn=cntt[0][1]\nfor c in cntt:\n if c[1]==maxn:\n print(c[0])\n else:\n break', 'n=int(input())\ns=[str(input()) for _ in range(n)]\nimport collections\ncnt=collections.Counter(s)\ncntt... | ['Wrong Answer', 'Accepted'] | ['s816244595', 's973448663'] | [49648.0, 50444.0] | [389.0, 522.0] | [200, 252] |
p02773 | u345483150 | 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().split()\nc=collections.Counter(s)\nk=list(c.most_common())\n#print(k[0][0])\ncnt=0\nfor i in range(n):\n if k[i][1]>cnt:\n cnt=k[i][1]\n l=[k[i][0]]\n elif k[i][1]==cnt:\n l.append(k[i][0])\n else:\n break \nfor i in l:\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s144223679', 's297619810', 's380479799', 's550797853', 's638377983', 's762374725', 's577332501'] | [3316.0, 3316.0, 3316.0, 3316.0, 3316.0, 3316.0, 35572.0] | [21.0, 20.0, 21.0, 22.0, 21.0, 21.0, 699.0] | [313, 200, 202, 187, 297, 284, 232] |
p02773 | u346424924 | 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\nd = {}\nfor i in range(n):\n if s[i] in d:\n d[s[i]] += 1\n else:\n d[s[i]] = 1\n\nd_s = sorted(d.items(), key=lambda x: x[1])\n\nma = [m[0] for m in d.items() if m[1] == max(d.values())]\nprint(*sorted(ma))', 'from collections import Counter\nn... | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s242834514', 's612857445', 's092379151'] | [46924.0, 35568.0, 45044.0] | [2106.0, 2105.0, 664.0] | [267, 174, 238] |
p02773 | u347600233 | 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 = [0 for i in range(n)]\ndics = {}\nfor i in range(n):\n try:\n s = input()\n a = dics[s]\n dics[s] += 1\n except KeyError:\n dics[s] = 1\nmax_v = max(dics.values())\nmax_k_list = [kv[0] for kv in dics.items() if kv[1] == max(dics.values())]\nfor i in max_k_list:\... | ['Wrong Answer', 'Accepted'] | ['s455591249', 's790287344'] | [35088.0, 38892.0] | [2109.0, 386.0] | [318, 178] |
p02773 | u347640436 | 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\nm = max(d.values())\nfor s in sorted(d[k] for k in d if d[k] == m):\n print(s)\n', 'N = int(input())\n\nd = {}\nfor _ in range(N):\n S = input()\n if S in d:\n d[S] += 1\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s379587894', 's743791709', 's089249524'] | [32096.0, 32096.0, 32096.0] | [498.0, 354.0, 643.0] | [201, 253, 198] |
p02773 | u347920118 | 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 =[]\n \n"""for i in range(N):\n s=input()\n if s in l:\n l[s]+=1\n else:\n l[s]=1\nprint(l)"""\nfor i in range(N):\n s=input()\n if s in l:\n l[s]+=1\n else:\n l[s]=1\n#print(l)\nmax = max(l.values())\nprint(max)\nfor i in l:\n #print(l[i])\n if l[i]==nu... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s092891456', 's704590776', 's609796467'] | [32096.0, 32988.0, 32988.0] | [373.0, 674.0, 675.0] | [360, 360, 361] |
p02773 | u349724238 | 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\nimport itertools\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))', 'N = int(input())\n... | ['Wrong Answer', 'Accepted'] | ['s811549544', 's622533698'] | [45324.0, 35476.0] | [620.0, 670.0] | [283, 258] |
p02773 | u350248178 | 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)]\nimport collections\nc=collections.Counter(l)\nll=c.most_common()\ntmp=ll[0][1]\nans=[]\nfor i,j in ll:\n if tmp==j:\n ans.append(i)\n else:\n ans.sort()\n print('\\n'.join(map(str,ans)))\n print(1)\n break\nans.sort()\nprint('\\n'... | ['Wrong Answer', 'Accepted'] | ['s527501263', 's243439014'] | [50308.0, 50308.0] | [639.0, 623.0] | [322, 246] |
p02773 | u350578302 | 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)]\nprint_list = []\ncount = []\nS_max = 0\n\nfor i in range(N):\n\tS_count = S.count(S[i])\n\tif S_max <= S_count:\n\t\tS_max = S_count\n\t\tprint_list.append(S[i])\n\nfor i in range(len(print_list)):\n\tprint(sorted(print_list)[i])', 'import collections\nS_print = []\nN=in... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s089093999', 's198012854', 's351675251', 's604040928', 's896731299', 's960095478', 's416529524'] | [19100.0, 47672.0, 47664.0, 35572.0, 59348.0, 59348.0, 47612.0] | [2104.0, 860.0, 838.0, 556.0, 677.0, 890.0, 850.0] | [256, 300, 309, 311, 304, 327, 342] |
p02773 | u357230322 | 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=input()\n s.append(S)\n\nc = collections.Counter(s)\nprint(c.most_common()[0][0])\nfor i in range(1,n):\n if c.most_common()[i-1][1]==c.most_common()[i][1]:\n print(c.most_common()[i][0])\n else:\n break', 'import collections\nn=int(input())\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s284167743', 's354505360', 's621478166', 's035076774'] | [45040.0, 46964.0, 46888.0, 47672.0] | [2106.0, 619.0, 611.0, 792.0] | [265, 227, 227, 268] |
p02773 | u357751375 | 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 = list(input() for i in range(n))\ns = sorted(s)\nc = collections.Counter(s)\np = max(c.values())\ns = list(set(s))\n\nfor i in range(len(s)):\n if c[s[i]] == p:\n print(s[i])', 'from collections import Counter\nn = int(input())\ns = list(input() for i in range(n))\... | ['Wrong Answer', 'Accepted'] | ['s692756479', 's910117446'] | [48712.0, 48700.0] | [511.0, 512.0] | [216, 210] |
p02773 | u366886346 | 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=0\nc=0\nlist=[]\nlist2=[]\nfor i in range(n):\n s=input()\n list.append(s)\nfor x in list:\n b=list.count(x)\n if b>=c:\n c=b\nfor x in list:\n if c==list.count(x):\n list2.append(x)\nfor x in list2:\n if list2.count(x)>=2:\n list2.remove(x)\nfor x in list2:\n ... | ['Wrong Answer', 'Accepted'] | ['s469973851', 's530410144'] | [18944.0, 45088.0] | [2105.0, 1015.0] | [310, 213] |
p02773 | u368579103 | 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())\nx = [input() for i in range(n)]\ni = 0\ncount, yo = [], []\n\nwhile not(x == []):\n a = x.count(x[i])\n count.append(a)\n yo.append(x[i])\n x.remove(x[i])\n \nfor k, c in enumerate(count):\n if c == max(count):\n print(yo[k])\n\n\n\n\n', 'import collections\nn = int(input())\ns = [input() f... | ['Wrong Answer', 'Accepted'] | ['s970428893', 's670187697'] | [17052.0, 35572.0] | [2108.0, 675.0] | [244, 281] |
p02773 | u369796672 | 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())\nl = [input() for _ in range(H)]\n \nc = collections.Counter(l)\n \nL = c.most_common()\n \nvalues, counts = zip(*c.most_common())\n \nA = list(values)\nB = list(counts)\n \nb = B.count(B[0])\n \na = A[0:b + 1]\n \nfor i in a[0:]:\nprint(i)', 'import collections\n\nN = int(inpu... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s040712110', 's051731044', 's148985072', 's212844274', 's216780764', 's349016327', 's418729081', 's523195463', 's625690338', 's753996093', 's766572111', 's789962196'] | [3060.0, 3060.0, 73576.0, 17412.0, 3060.0, 3060.0, 73584.0, 73708.0, 73576.0, 73580.0, 3316.0, 73584.0] | [17.0, 18.0, 720.0, 268.0, 18.0, 18.0, 585.0, 577.0, 721.0, 608.0, 22.0, 921.0] | [261, 253, 259, 83, 253, 253, 169, 213, 263, 228, 250, 272] |
p02773 | u370429695 | 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 in dic:\n dic[s] += 1\n else:\n dic[s] = 1\nmax_k_list = [kv[0] for kv in dic.items() if kv[1] == max(dic.values())]\nfor i in max_k_list:\n print(i)', "N = int(input(''))\ndict = {}\nfor i in range(N):\n S = input('')\n if S in dict:... | ['Wrong Answer', 'Accepted'] | ['s078073649', 's889871293'] | [32096.0, 32092.0] | [2105.0, 828.0] | [217, 243] |
p02773 | u371132735 | 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())\ncnt = Counter(S).most_common()\nfor a,b in cnt:\n print(a*(b==cnt[0][1]))\n', 'from collections import Counter\nN = int(input())\nS = []\nfor i in range(N):\n S.append(input())\ncnt = Counter(S).most_common()\nans ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s675224027', 's930962918', 's788895438'] | [45040.0, 45040.0, 38164.0] | [551.0, 687.0, 527.0] | [169, 211, 253] |
p02773 | u371409687 | 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 tmp=input()\n if not tmp in a:\n a[tmp] = 1\n else:\n a[tmp] += 1\nans=sorted(a.items(), key=lambda x: -x[1])\nfor k, v in a.items():\n if v == max(a.values()):\n print(k)', 'n=int(input())\na={}\nfor i in range(n):\n tmp=input()\n if n... | ['Wrong Answer', 'Accepted'] | ['s128514859', 's969262431'] | [43228.0, 32096.0] | [2106.0, 714.0] | [236, 264] |
p02773 | u372208514 | 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("in>"))\n\nall_str = []\nfor i in range(N):\n str_temp = input()\n all_str.append(str_temp)\n\nunique_str = list(set(all_str))\n\nmax_cnt = 0\nstr_num = dict()\nfor i in unique_str:\n cnt = all_str.count(i)\n str_num[i] = cnt\n if max_cnt < cnt:\n max_cnt = cnt\n\ndisp_list = []\nf... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s877335474', 's904472381', 's393657312'] | [35616.0, 35540.0, 49628.0] | [2206.0, 2206.0, 541.0] | [409, 434, 463] |
p02773 | u372550522 | 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 i in range(n):\n a = input()\n if a in dic:\n dic[a] += 1\n else:\n dic[a] = 0\n\nl = sorted(dic.items(), key=lambda x: x[1], reverse=True)\nnum = l[0][1]\nfor i in range(len(l)):\n if l[i][1] == num:\n print(l[i][0])\n else:\n break', 'n = in... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s485497695', 's946432635', 's482915445'] | [44892.0, 44892.0, 45788.0] | [564.0, 622.0, 697.0] | [293, 298, 341] |
p02773 | u374829922 | 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())\nc = [0 for _ in range(n)]\nfor i in range(n):\n c[i] = input()\nc = collections.Counter(c).most_common()\n\nfirst = c[0][1]\nfor i in c:\n if i[1] == first:\n print(i[0])', 'import collections\nn = int(input())\nc = [0 for _ in range(n)]\nfor i in range(n):\n c[i]... | ['Wrong Answer', 'Accepted'] | ['s682281367', 's076352048'] | [45028.0, 45028.0] | [547.0, 715.0] | [211, 263] |
p02773 | u376270730 | 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 contest(N, str):\n count = {}\n\n for s in str:\n if s not in count:\n count[s] = 1\n\n else:\n count[s] += 1\n \n ret = sorted(count.items(),key=lambda count: count[1], reverse=True)\n maxnum = ret[0][1]\n \n retVal = []\n\n for r in ret:\n if r... | ['Runtime Error', 'Accepted'] | ['s287890940', 's348664215'] | [17056.0, 48072.0] | [297.0, 577.0] | [592, 590] |
p02773 | u378153116 | 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 poll(s_list):\n s_dict = {}\n for s in s_list:\n if s not in s_dict:\n s_dict[s] = 1\n else:\n s_dict[s] += 1\n\n max_val = max(s_dict.values())\n max_key = [key for key in s_dict if s_dict[key] == max_val]\n\n new_s_list = sorted(max_key)\n return new_s_list\n\ns_list = []\nn = int(input())... | ['Wrong Answer', 'Accepted'] | ['s328466020', 's942996514'] | [35220.0, 35220.0] | [536.0, 639.0] | [494, 509] |
p02773 | u382639013 | 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.append(str(input()))\n\nimport collections\n\ncounter = Counter(S)\n\nmax_cnt = max(counter.values())\n\nnames = [n for n,c in counter.items() if c==max_cnt]\nnames.sort()\nprint(*names, sep='\\n')", 'N = int(input())\nS = list()\nfor i in range(N):\n S.appen... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s084614911', 's135328214', 's600123351', 's948170961'] | [17292.0, 35472.0, 41104.0, 35980.0] | [349.0, 551.0, 584.0, 684.0] | [239, 186, 206, 251] |
p02773 | u384198197 | 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. | ["dict={}\noutput=[]\n\niteration=read()\nif(iteration.isdigit()):\n iteration=int(iteration)\nelse:\n iteration=int(float(iteration))\nfor _ in range(iteration):\n item=read()\n \n if dict.get(item) is None:\n dict[item]=0 \n dict[item]+=1 \nmax_val=max(dict.values())\nwhile(bool(dict)):\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s024740268', 's181425614', 's184970918', 's118548540'] | [9128.0, 35412.0, 35332.0, 36676.0] | [28.0, 190.0, 194.0, 299.0] | [472, 441, 427, 436] |
p02773 | u384768892 | 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\nfrom collections import Counter\n\nN = int(input())\nS = [input() for _ in range(N)]\n\nc = Counter(S)\nd = c.most_common()\n\nt = 1\n\nfor i in range(1, len(d)):\n if d[0][1] == d[i][1]:\n t += 1\n else:\n pass\n\nfor i in range(t):\n print(d[i][0])', 'import numpy as np\nfrom collection... | ['Wrong Answer', 'Accepted'] | ['s101157867', 's002514979'] | [55480.0, 57916.0] | [758.0, 1030.0] | [261, 326] |
p02773 | u384793271 | 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)]\n\nS_L = list(set(S))\n\n\n # if i not in S_L:\n # S_L.append(i)\n# print(S_L)\n\nS_N = [0] * len(S_L)\n\nfor j in S:\n ind = S_L.index(j)\n S_N[ind] += 1\n# print(S_N)\n\nS_max = [] \nS_N_max = max(S_N) \n\nfor k in range(len(S_N)):\n if S_N[k] == ... | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s005496456', 's496889097', 's011515122'] | [29076.0, 17308.0, 35820.0] | [2104.0, 2104.0, 577.0] | [582, 562, 247] |
p02773 | u385309449 | 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)]\nr=[]\nd={}\nfor i in l:\n if i in d:\n d[i]+=1\n else:\n d[i]=1\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')", 'n = int(input())\ns = sorted([input() for _ in range(n)])\... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s355585277', 's480363856', 's922932423'] | [3064.0, 20136.0, 37132.0] | [17.0, 618.0, 605.0] | [242, 505, 259] |
p02773 | u386027192 | 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. | ['d={}\nk=0\nj=0\nfor i in range(int(input())):\n s=input()\n if d.get(s) is None:\n d[s]=1\n else:\n d[s]+=1\nfor i in sorted(d,key=d.get,reverse=True):\n print(i)\n k=d[i]\n break\nfor i in sorted(d,key=d.get,reverse=True):\n j+=1\n if j>1:\n if d[i]==k:\n print... | ['Wrong Answer', 'Accepted'] | ['s421043556', 's471164172'] | [32216.0, 32220.0] | [713.0, 997.0] | [305, 350] |
p02773 | u387080888 | 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 _ in range(n):\n s.append(str(input()))\nans=collections.Counter(s)\nvalues,count=zip(*ans.items())\nfor l in range(len(count)):\n if max(count)==count[l]:\n print(values[l])', 'import collections\nn=int(input())\ns=[]\nfor _ in range(n):\n s.append(str(in... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s074899619', 's217247657', 's477065880', 's758864854', 's236737505'] | [59328.0, 35564.0, 59508.0, 46576.0, 35564.0] | [2105.0, 546.0, 2105.0, 530.0, 656.0] | [224, 198, 230, 216, 199] |
p02773 | u392058721 | 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 _ in range(n)]\nd = dict((l,s.count(l)) for l in set(s))\nmax = 0\nfor x, y in d.items():\n if y > max:\n max = y\nfor x, y in d.items():\n if y == max:\n print(x)', 'n = int(input())\nd = {}\nfor i in range(n):\n s = str(input())\n if s in d.keys():\n... | ['Wrong Answer', 'Accepted'] | ['s113500358', 's203630455'] | [29076.0, 32096.0] | [2105.0, 696.0] | [214, 227] |
p02773 | u394352233 | 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 = [input() for i in range(N)]\nimport collections\nc = collections.Counter(A)\nprint(c.most_common()[0][0])', 'N = int(input())\nA = [input() for i in range(N)]\nimport collections\nc = collections.Counter(A)\n#print(c)\nmax = c.most_common()[0][1]\n#print(max)\n#print(c.most_common()[0][0])\nli =... | ['Wrong Answer', 'Accepted'] | ['s287538508', 's927007692'] | [46348.0, 45072.0] | [398.0, 695.0] | [123, 296] |
p02773 | u394731058 | 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 as c\n\nn = int(input())\nl = [input() for _ in range(n)]\nc = c.Counter(l)\nc = c.most_common()\nfor i in c:\n if i[1] == c[0][1]: \n print(i[0])', 'import collections as c\n\nn = int(input())\nl = [input() for _ in range(n)]\nc = c.Counter(l)\nc = c.most_common()\nans = []\nfor i in c:\n if ... | ['Wrong Answer', 'Accepted'] | ['s114692200', 's790975541'] | [45040.0, 45040.0] | [572.0, 729.0] | [161, 211] |
p02773 | u394950523 | 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 i in range(N):\n S.append(input())\n\nS.sort() \ncounted = Counter(S)\nl = counted.most_common()\nm = l[0][1]\nl.sort()\nfor i in l:\n if m == i[1]:\n print(i[0])\n else:\n break', 'from collections import Counter\n\nN = int(input... | ['Wrong Answer', 'Accepted'] | ['s834695890', 's583342552'] | [46840.0, 46900.0] | [1004.0, 979.0] | [327, 303] |
p02773 | u395202850 | 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 sys\nimport collections\nimport bisect\nreadline = sys.stdin.readline\n\n\ndef main():\n n = int(readline().rstrip())\n S = [readline().rstrip() for _ in range(n)]\n c = collections.Counter(S)\n maxS = c.most_common()[0][1]\n for i in range(len(c)):\n if c.most_common()[i][1]... | ['Wrong Answer', 'Accepted'] | ['s100809205', 's196266728'] | [49636.0, 51064.0] | [2207.0, 311.0] | [396, 384] |
p02773 | u398175819 | 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\ncdic = {}\nfor i in range(N):\n si = input()\n if si not in cdic.keys():\n cdic[si] = 1\n else:\n cdic[si] += 1\n \nspair = sorted(cdic.items(), key=lambda x:x[1], reverse=True)\nvmax = -1\nmaxes = []\nfor pair in spair:\n if pair[1] >= vmax:\n maxes.append(... | ['Wrong Answer', 'Accepted'] | ['s814862378', 's680818557'] | [47324.0, 47324.0] | [758.0, 762.0] | [398, 501] |
p02773 | u403331159 | 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()\ncnt=1\nans=0\npri=[]\nfor i in range(n-1):\n if s[i]==s[i+1]:\n cnt+=1\n else:\n ans=max(cnt,ans)\n cnt=1\nans=max(cnt,ans)\nfor i in range(n):\n if ans==s.count(s[i]):\n pri.append(s[i])\nprint(ans)\nt=set(pri)\np=list(t)\n... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s108901394', 's385632811', 's938014487', 's520132177'] | [17796.0, 20680.0, 17796.0, 20676.0] | [2104.0, 702.0, 2108.0, 705.0] | [347, 458, 316, 447] |
p02773 | u405256066 | 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\nfrom sys import stdin\nN = int(stdin.readline().rstrip())\ndata = []\nfor i in range(N):\n s = (stdin.readline().rstrip())\n data.append(s)\nc = collections.Counter(data)\nmaxc = max(c.values())\nfor j in c.keys():\n if c[j] == maxc:\n print(j)', 'import collections\nfrom sys impor... | ['Wrong Answer', 'Accepted'] | ['s025256774', 's063679057'] | [35560.0, 35564.0] | [318.0, 487.0] | [269, 277] |
p02773 | u406405116 | 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 inverse_lookup(d, x):\n a = []\n for k,v in d.items():\n if x == v:\n a.append(k)\n print(type(a))\n return sorted(a)\n\nn = int(input())\nw = {}\nfor _ in range(n):\n i = input()\n if i in w:\n w[i] += 1\n else:\n w[i] = 1\nm = max(w.values())\nfor j in inverse_lookup(w,m):\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s147823634', 's540085358', 's760806229'] | [32988.0, 27112.0, 32988.0] | [699.0, 89.0, 628.0] | [310, 288, 291] |
p02773 | u406984840 | 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 = []\nkaisuu = []\nsolution = []\nindex = 0\n\nfor i in range(N):\n tmp = input()\n S.append(tmp)\n \nc = collections.Counter(S)\n\nd = c.most_common()\n\nmax_ = d[0][1]\n\nfor i in range(len(d)):\n if d[i][1] == max_:\n solution.append(d[i][0])\n\nfor i in solution:\n... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s644761785', 's705964679', 's889356836', 's660809528'] | [47068.0, 47048.0, 3956.0, 47664.0] | [644.0, 632.0, 2104.0, 768.0] | [305, 305, 419, 305] |
p02773 | u411237324 | 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\ndic = defaultdict(int)\n\nn = int(input())\nA = [input() for i in range(n)]\n# A = list(map(str, A))\n# print(A)\n\nvote = 0\n\nfor elem in A:\n dic[elem] += 1\n# print(dic)\nm = max(dic.values())\n# print(m)\n\nfor key in dic:\n # print(dic[key])\n if dic[key] == m:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s681759669', 's929207105', 's587812081'] | [35572.0, 39280.0, 35572.0] | [491.0, 610.0, 690.0] | [315, 326, 329] |
p02773 | u411858517 | 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 _ in range(N)]\n\nword = {}\nfor i in range(N):\n if L[i] in word:\n word[L[i]] += 1\n else:\n word[L[i]] = 1\n\nmax_count = 0\nfor i in range(N):\n max_count = max(max_count, word[L[i]])\n \nans = []\nfor i in range(N):\n if word[L[i]] == max_count:\n ... | ['Wrong Answer', 'Accepted'] | ['s978086614', 's525458020'] | [35216.0, 45456.0] | [796.0, 840.0] | [388, 403] |
p02773 | u413165887 | 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 = [str(input()) for i in range(n)]\n\nfrom collections import Counter\nc = Counter(s)\n\nresult = [i for i in c.items() if i[1]==max(c.values())]\n\nfor i in range(len(result)):\n print(result[i][0])', 'n = int(input())\n \ns = [str(input()) for i in range(n)]\n \nfrom collections import Coun... | ['Wrong Answer', 'Accepted'] | ['s640832356', 's313429301'] | [35476.0, 35476.0] | [2105.0, 677.0] | [214, 250] |
p02773 | u414376763 | 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 = []\ns_uniq = []\nmax_count = 0\nmax_s = []\n\nfor i in range(n):\n s_n = str(input())\n s.append(s_n)\n if s_n not in s_uniq:\n s_uniq.append(s_n)\n\nfor i in s_uniq:\n if s.count(i) > max_count:\n max_count = s.count(i)\n max_s = []\n max_s.append(i)\n elif s.count(i) == max_co... | ['Wrong Answer', 'Accepted'] | ['s545743352', 's442139151'] | [23200.0, 35280.0] | [2206.0, 510.0] | [353, 211] |
p02773 | u414615201 | 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. | ['# input\nN = int( input() )\nS = list()\nfor ii in range(N):\n S.append( input() )\nS.sort()\n\n# calc \nimport collections\nC = collections.Counter( S )\n\n# output \nfor key in C.most_common():\n print(key[0])', "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# input\nN = int( input() )\nS = list... | ['Wrong Answer', 'Accepted'] | ['s525954274', 's909211254'] | [46864.0, 35852.0] | [742.0, 642.0] | [213, 353] |
p02773 | u414980766 | 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\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nN = int(readline())\nS = read().split()\n\nS = sorted(S)\nls = [[] for i in range(N + 1)]\nmax_num = 0\nleft = 0\nright = 0\nwhile right < N:\n while right < N and S[left] == S[right]:\n r... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s260081428', 's816471602', 's010698423'] | [30564.0, 3064.0, 50960.0] | [422.0, 17.0, 684.0] | [472, 249, 254] |
p02773 | u422272120 | 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 not s in d:\n d[s] = 1\n else:\n d[s] += 1\nd_max = max(d.values())\nans = [k for k, v in d.items() if v == d_max]\nfor a in ans:\n print (a)', 'n = int(input())\nd = {}\nfor _ in range(n):\n s = input()\n if s in d:\n ... | ['Wrong Answer', 'Accepted'] | ['s478488503', 's964872307'] | [32096.0, 32988.0] | [470.0, 637.0] | [220, 224] |
p02773 | u423966555 | 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\nn = int(input())\n\nd = defaultdict(int)\nfor _ in range(n):\n key = input()\n d[key] += 1\n\ndict = sorted(d.items(), key=lambda x:x[1], reverse=True)\nmax_v = max(d.values())\n\ndict_li = []\nfor a in dict:\n if a[1]==max_v:\n dict_li.append(a[0])\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s289354827', 's573851737'] | [46084.0, 35952.0] | [816.0, 522.0] | [361, 201] |
p02773 | u424467986 | 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 i in range(N):\n S.append(input())\n\nans = {}\nfor cnt in S:\n if cnt in ans:\n ans[cnt] += 1\n else:\n \tans[cnt] = 1\n\nmax_v = max(ans.values())\nfor k, v in ans.items():\n if v == max_v:\n print(k)', '\nN = int(input())\n\nS = []\nfor i in range(N):\n S.append(input(... | ['Wrong Answer', 'Accepted'] | ['s106421085', 's137845527'] | [35216.0, 45708.0] | [460.0, 835.0] | [355, 454] |
p02773 | u425184437 | 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())\nq={}\nfor i in range(N):\n S=input()\n if S in q:\n q[S]+=1\n else:\n q[S]=1\nmax_q_list = [kv[0] for kv in q.items() if kv[1] == max(q.values())] \nfor i in max_q_list:\n print(i)', 'N=int(input())\nfrom collections import Counter\nA=[]\nfor i in range(N):\n s=input()\n A.append(s)\na=... | ['Wrong Answer', 'Accepted'] | ['s879540398', 's658978121'] | [32096.0, 45044.0] | [2104.0, 701.0] | [199, 241] |
p02773 | u425762225 | 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 _ in range(N)]\nm = set(l)\nd = dict()\n\nfor name in m:\n d[name] = l.count(name)\n \n \nmax_kv_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]\nfor name in max_kv_list:\n print(name)', "#!/usr/bin/env python3\nfrom collections import Counter\n\ndef solve(l):\n ... | ['Wrong Answer', 'Accepted'] | ['s674729252', 's433093985'] | [29076.0, 38728.0] | [2105.0, 431.0] | [227, 379] |
p02773 | u428199834 | 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\nd=collections.Counter(s)\nlargest=max(list(d.values()))\nans=[]\nfor key in d.keys():\n if d[key]==largest:\n ans.append(key)\nans.sort()\nwhile len(ans)>0:\n print(ans.popleft(-1))\n \n \n', 'n=int(input())\ns=[]\nfor _ in rang... | ['Runtime Error', 'Accepted'] | ['s857148781', 's999261641'] | [38924.0, 38848.0] | [394.0, 458.0] | [263, 259] |
p02773 | u428747123 | 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 as col\n\n\nn=int(input())\ns=[input() for i in range(n)]\nc = col.Counter(s)\nmax = max(c.values())\nans = []\n\nfor key,val in c.items():\n if val == max:\n ans.append(key)\n\n\nfor i in ans:\n print(i)\n\n \n\n', 'import collections as col\n\n\nn=int(input())\ns=[input() for i in ... | ['Wrong Answer', 'Accepted'] | ['s475878143', 's892128618'] | [35572.0, 35572.0] | [504.0, 630.0] | [228, 235] |
p02773 | u430928274 | 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\n\nmx = max(d.values())\nfor s in sorted(k for k in d if d[k] == m) :\n print(s)\n', 'n = int(input())\nd = {}\nfor _ in range(n) :\n s = input()\n if s in d :\n d[s] += 1\n... | ['Runtime Error', 'Accepted'] | ['s490552412', 's133525741'] | [35296.0, 35424.0] | [289.0, 439.0] | [202, 203] |
p02773 | u432098488 | 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\nd = {}\nfor s in S:\n if s in d:\n d[s] += 1\n else:\n d[s] = 1\n \nans = 0\nfor i in d:\n if ans < d[i]:\n ans = d[i]\n\nfor i in d:\n if ans == d[i]:\n print(i)', 'n = int(input())\nS = []\nfor _ in range(n):\n S.append(inp... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s366933247', 's530799036', 's715845642', 's325144177'] | [35216.0, 35220.0, 35220.0, 32988.0] | [477.0, 467.0, 525.0, 694.0] | [233, 240, 265, 252] |
p02773 | u435076592 | 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, stdout\nfrom collections import defaultdict\nn = int(stdin.readline().strip())\nword_map = defaultdict(lambda: 0)\nmaxi = 0\nfor i in range(n):\n word = stding.readline().strip()\n x = word_map[word]\n word_map[word] = x + 1\n maxi = max(maxi, x+1)\n \nword_list = []\nfor key, value in wor... | ['Runtime Error', 'Accepted'] | ['s022319104', 's574604280'] | [3316.0, 32452.0] | [20.0, 550.0] | [435, 431] |
p02773 | u435108403 | 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()\n\nfor _ in range(N):\n S.append(input())\nS_set = set(S)\nS_dict = dict()\nfor s in S_set:\n S_dict[s] = 0\n\nfor val in S:\n S_dict[val] += 1\nmax_num = max(S_dict.values())\nans = list()\nfor k, v in S_dict.items():\n if v == max_num:\n ans.append(k)\nsorted(ans)\nfo... | ['Wrong Answer', 'Accepted'] | ['s762851604', 's611726048'] | [49420.0, 49424.0] | [785.0, 729.0] | [362, 339] |
p02773 | u436664080 | 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\n\nn = int(stdin.readline().rstrip())\ns = []\nd = [0] * 200000 \nmax = 1\n\nfor i in range(n):\n t = stdin.readline().rstrip()\n d[i] = 1\n for ss in s:\n if t == ss:\n d[i] = d[i] + 1\n if max < d[i]:\n max = d[i]\n s.append(t)\n\nresult ... | ['Wrong Answer', 'Accepted'] | ['s739211936', 's480379479'] | [5216.0, 32092.0] | [2104.0, 544.0] | [414, 399] |
p02773 | u437215432 | 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\ndef f(n, a):\n index, count = np.unique(a, return_counts=True)\n mx = max(count)\n for s in index[count == mx]:\n print(s)\n print(mx)\n\nn = int(input())\na = [0] * n\nfor i in range(n):\n a[i] = input()\nf(n, a)\n', 'import numpy as np\ndef f(n, a):\n index, count = np.u... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s160845717', 's464003250', 's097638917'] | [25920.0, 26692.0, 46884.0] | [405.0, 404.0, 625.0] | [244, 244, 443] |
p02773 | u437723389 | 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()\nwords_org = []\nfor i in range(int(n)):\n words_org.append(input())\nprint(words_org)\n\ncountDic = { k: words_org.count(k) for k in set(words_org) }\nranking = sorted([item for item in countDic.items()], key = lambda x:x[1], reverse=True)\norder = 0\ntop = ranking[0][1]\ncandidates = []\nwhile ranking[... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s099207350', 's398385444', 's745007921', 's864471221', 's191972855'] | [33940.0, 3064.0, 3064.0, 33940.0, 32988.0] | [2105.0, 17.0, 317.0, 2105.0, 680.0] | [461, 385, 349, 422, 341] |
p02773 | u439212411 | 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\ndef inverse_lookup(d, x):\n cList = []\n for k,v in d.items():\n if x == v:\n l = k\n cList.append(l) \n return cList\n\nn = int(input())\nList=[input() for i in range(n)]\nc = collections.Counter(List)\nprint(c)\nn = max(c.values())\nout=sorted(inverse_lookup... | ['Wrong Answer', 'Accepted'] | ['s114430897', 's252812603'] | [58696.0, 35572.0] | [814.0, 643.0] | [346, 338] |
p02773 | u440129511 | 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)\nl=c.most_common()\nk=l[0][1]\nfor i in range(n):\n if l[i][1]==k:print(l[i][0])\n else:exit()', 'import collections\nn=int(input())\ns=[input() for _ in range(n)]\nc=collections.Counter(s)\nl=c.most_common()\nk=l[0][1]\... | ['Runtime Error', 'Accepted'] | ['s714848558', 's095174600'] | [46880.0, 47636.0] | [575.0, 773.0] | [184, 250] |
p02773 | u440161695 | 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())\nd=dict()\nma=0\nfor i in range(N):\n s=input()\n if s not in d:\n d[s]=0\n d[s]+=1\nd=OrderedDict(sorted(d.items(), key=lambda x:x[1], reverse=True))\nfor i in d:\n if ma<=i:\n ma=i\n if ma!=i:\n exit()\n print(d[i])', 'N=int(input())\nd=dict()\nA=[]... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s680276065', 's732954736', 's905563775'] | [107092.0, 32096.0, 44124.0] | [1067.0, 510.0, 930.0] | [269, 161, 177] |
p02773 | u441254033 | 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())\n\nss = []\nfor _ in range(n):\n ss.append(input())\n\nc = collections.Counter(ss)\n\nl = c.most_common()\n\nprint(l[0][1])\nfor i in range(len(l)-1):\n if l[i][1] == l[i+1]:\n print(l[i+1])\n else:\n break\n\n\n', '\nimport collections\n\nn = int(input())\n\nss = []\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s042523128', 's525108430', 's631546040'] | [45032.0, 46872.0, 50288.0] | [440.0, 616.0, 679.0] | [241, 247, 298] |
p02773 | u441320782 | 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())\nlis=list(input() for _ in range(N))\nans=[]\nhigh=0\n\ncounter=Counter(lis)\nhigh=counter.most_common()[0][1]\n\nfor j in se:\n if lis.count(j)==high:\n ans.append(j)\nans.sort()\n\nfor k in ans:\n print(k)', 'from collections import Counter\nN=int(input())\nlis=... | ['Runtime Error', 'Accepted'] | ['s130086977', 's619303663'] | [45044.0, 45048.0] | [423.0, 735.0] | [246, 265] |
p02773 | u442877951 | 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(map(str,input().split()))\ncollections.Counter(S)\nprint(max(collections.Counter(S)))\n', 'from collections import Counter\nN = int(input())\nS = [input() for _ in range(N)]\nCS = Counter(S)\nmath = 0\nans = []\nfor i in CS.values():\n v = max(v,i)\nfor i,j in CS.items... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s626595244', 's761295683', 's768298294', 's874223673', 's927444472', 's122236058'] | [3316.0, 35572.0, 2940.0, 2940.0, 37748.0, 35568.0] | [22.0, 302.0, 17.0, 17.0, 587.0, 682.0] | [129, 256, 252, 250, 225, 271] |
p02773 | u443151804 | 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 *\n_,*a=map(lambda x:x.rstrip(), open(0))\na=Counter(a).most_common()\na=[i[0] for i in a if i[1]==a[0][1]]\nprint(*a,sep="\\n")', 'import sys,collections\ns=collections.Counter(map(lambda x: x.rstrip(),sys.stdin.readlines()[1:])).most_common()\nprint(*[i[0] for i in s if i[1]==s[0][1]],sep="\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s151791020', 's840043991', 's666633054'] | [45036.0, 49248.0, 45028.0] | [324.0, 334.0, 485.0] | [147, 163, 155] |
p02773 | u446774692 | 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 Counter\nls = Counter(S).most_common()\nMAX = ls[0][1]\n\nfor s,length in ls:\n if MAX == length:\n print(s)\n else:\n exit()\n', "N = int(input())\nS = []\nfor i in range(N):\n S.append(input())\n\nf... | ['Wrong Answer', 'Accepted'] | ['s047644045', 's934082767'] | [45068.0, 45068.0] | [551.0, 711.0] | [228, 273] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.