problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02773 | import collections
n = int(input())
p = [input() for i in range(n)]
c = collections.Counter(p)
m = c.most_common()
most = m[0][1]
answer = []
answer.append(m[0][0])
for i in range(len(m)-1):
if m[i+1][1] == most:
answer.append(m[i+1][0])
else:
break
for output in sorted(answer):
print(... | import collections
n = int(input())
p = [input() for i in range(n)]
c = collections.Counter(p)
m = c.most_common()
most = m[0][1]
answer = []
answer.append(m[0][0])
for i in range(len(m)-1):
if m[i+1][1] == most:
answer.append(m[i+1][0])
else:
break
for output in sorted(answer):
print(... | [
"control_flow.return.remove"
] | 571,204 | 571,203 | u619084943 | python |
p02773 | from collections import Counter
import sys
n = int(sys.stdin.readline())
sn = sys.stdin.read().split()
c = Counter(sn)
c = sorted(c.items(), key=lambda x: (x[1], x[0]))
num = c[0][1]
for i, j in c:
if j == num:
print(i)
else:
quit() | from collections import Counter
import sys
n = int(sys.stdin.readline())
sn = sys.stdin.read().split()
c = Counter(sn)
c = sorted(c.items(), key=lambda x: (-x[1], x[0]))
num = c[0][1]
for i, j in c:
if j == num:
print(i)
else:
quit() | [
"expression.operation.unary.add",
"call.arguments.change"
] | 571,211 | 571,212 | u780475861 | python |
p02773 | from collections import defaultdict
def solve():
N = int(input())
d = defaultdict(int)
for _ in range(N):
S = input()
d[S] += 1
items = list(d.items())
items.sort(key=lambda x:x[1], reverse=True)
mx = items[0][1]
cand = []
for item in items:
if item[1] == mx:
... | from collections import defaultdict
def solve():
N = int(input())
d = defaultdict(int)
for _ in range(N):
S = input()
d[S] += 1
items = list(d.items())
items.sort(key=lambda x:x[1], reverse=True)
mx = items[0][1]
cand = []
for item in items:
if item[1] == mx:
... | [
"assignment.add"
] | 571,225 | 571,226 | u647999897 | python |
p02773 | N = int(input())
hash = {}
for i in range(N):
key = input()
if key in hash:
hash[key] += 1
else:
hash[key] = 1
max = 0
results = []
for i, v in hash.items():
if max == v:
results.append(i)
elif max < v:
results = [i]
max = v
for i in results:
print(i)
| N = int(input())
hash = {}
for i in range(N):
key = input()
if key in hash:
hash[key] += 1
else:
hash[key] = 1
max = 0
results = []
for i, v in hash.items():
if max == v:
results.append(i)
elif max < v:
results = [i]
max = v
results.sort()
for i in results:
print(i)
| [
"call.add"
] | 571,237 | 571,238 | u301257907 | python |
p02773 | n = input()
s = [input() for i in range(n)]
u = set(s)
dic = dict(zip(u, [0]*len(u)))
for i in range(n):
dic[s[i]] += 1
m = max(dic.values())
res = []
for k, v in dic.items():
if v == m:
res.appned(k)
res.sort()
print(*res, sep="\n") | n = int(input())
s = [input() for i in range(n)]
u = set(s)
dic = dict(zip(u, [0]*len(u)))
for i in range(n):
dic[s[i]] += 1
m = max(dic.values())
res = []
for k, v in dic.items():
if v == m:
res.append(k)
res.sort()
print(*res, sep="\n") | [
"call.add",
"call.arguments.change",
"identifier.change"
] | 571,245 | 571,246 | u414980766 | python |
p02773 | from collections import Counter
n=int(input())
S=[input() for _ in range(n)]
c=Counter(s)
m=max(c.values())
ans = sorted(k for k,v in c.items() if v == m)
print("\n".join(ans)) | from collections import Counter
n=int(input())
S=[input() for _ in range(n)]
c=Counter(S)
m=max(c.values())
ans = sorted(k for k,v in c.items() if v == m)
print("\n".join(ans)) | [
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 571,247 | 571,248 | u595375942 | python |
p02773 | import sys
input = sys.stdin.readline
N = int(input())
S = []
for _ in range(N):
s = input().replace("\n", "")
S.append(s)
S.sort()
f = 0
tres = 0
res = [s[0]]
for i in range(1, N):
if S[i] == S[i-1]:
f += 1
else:
f = 0
if f == tres:
res.append(S[i])
elif f > tres:
... | import sys
input = sys.stdin.readline
N = int(input())
S = []
for _ in range(N):
s = input().replace("\n", "")
S.append(s)
S.sort()
f = 0
tres = 0
res = [S[0]]
for i in range(1, N):
if S[i] == S[i-1]:
f += 1
else:
f = 0
if f == tres:
res.append(S[i])
elif f > tres:
... | [
"assignment.value.change",
"identifier.change"
] | 571,249 | 571,250 | u672220554 | python |
p02773 | import sys
input = sys.stdin.readline
N = int(input())
S = []
for _ in range(N):
s = input().replace("\n", "")
S.append(s)
S.sort()
f = 0
tres = 0
res = []
for i in range(1, N):
if S[i] == S[i-1]:
f += 1
else:
f = 0
if f == tres:
res.append(S[i])
elif f > tres:
tr... | import sys
input = sys.stdin.readline
N = int(input())
S = []
for _ in range(N):
s = input().replace("\n", "")
S.append(s)
S.sort()
f = 0
tres = 0
res = [S[0]]
for i in range(1, N):
if S[i] == S[i-1]:
f += 1
else:
f = 0
if f == tres:
res.append(S[i])
elif f > tres:
... | [] | 571,251 | 571,250 | u672220554 | python |
p02773 | #標準入力からの値取得(N)
N = int(input())
#標準入力からの値取得(List)
S = []
for i in range(N):
S.append(input())
#ループで廻しつつ要素数をカウントする
ans = {}
for cnt in S:
if cnt in ans:
ans[cnt] += 1
else:
ans[cnt] = 1
max_v = max(ans.values())
for k, v in ans.items():
if v == max_v:
print(k) | #標準入力からの値取得(N)
N = int(input())
#標準入力からの値取得(List)
S = []
for i in range(N):
S.append(input())
#ループで廻しつつ要素数をカウントする
ans = {}
for cnt in S:
if cnt in ans:
ans[cnt] += 1
else:
ans[cnt] = 1
max_v = max(ans.values())
#ソートしながら出力。辞書をソートするとリストになるので注意。
for k, v in sorted(ans.items()):
if v == max_v:
print(k) | [
"call.add",
"call.arguments.change"
] | 571,252 | 571,253 | u424467986 | python |
p02773 | n = int(input())
dic = {}
m = 0
for i in range(n):
s = input()
if s in dic:
dic[s] += 1
m = max(m, dic[s])
else:
dic[s] = 1
m = max(m, dic[s])
ans = []
for s in dic:
if dic[s] == m:
ans.append(s)
print('\n'.join(ans.sort())) | n = int(input())
dic = {}
m = 0
for i in range(n):
s = input()
if s in dic:
dic[s] += 1
m = max(m, dic[s])
else:
dic[s] = 1
m = max(m, dic[s])
ans = []
for s in dic:
if dic[s] == m:
ans.append(s)
print('\n'.join(sorted(ans))) | [
"call.arguments.change"
] | 571,254 | 571,255 | u036340997 | python |
p02773 | n = int(input())
dic = {}
m = 0
for i in range(n):
s = input()
if s in dic:
dic[s] += 1
m = max(m, dic[s])
else:
dic[s] = 1
m = max(m, dic[s])
ans = []
for s in dic:
if dic[s] == m:
ans.append(s)
print('\n'.join(ans)) | n = int(input())
dic = {}
m = 0
for i in range(n):
s = input()
if s in dic:
dic[s] += 1
m = max(m, dic[s])
else:
dic[s] = 1
m = max(m, dic[s])
ans = []
for s in dic:
if dic[s] == m:
ans.append(s)
print('\n'.join(sorted(ans))) | [
"call.add",
"call.arguments.change"
] | 571,256 | 571,255 | u036340997 | python |
p02773 | import collections
n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in list_most:
print(i) | import collections
n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in sorted(list_most):
print(i) | [
"call.add",
"call.arguments.change"
] | 571,257 | 571,258 | u303384315 | python |
p02773 | import collections
n = int(input())
s = [input() for i in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in list_most:
print(i) | import collections
n = int(input())
s = [input() for _ in range(n)]
c_sort = collections.Counter(s).most_common()
list_most = [c_sort[i][0] for i in range(len(c_sort)) if c_sort[i][1] == c_sort[0][1]]
for i in sorted(list_most):
print(i) | [
"assignment.value.change",
"identifier.change",
"call.add",
"call.arguments.change"
] | 571,259 | 571,258 | u303384315 | python |
p02773 | from collections import Counter
n, cnt, mx, arr = int(input()), Counter(), -1, []
for i in range(n):
s = input()
arr.append(s)
cnt[s] += 1
mx = max(mx,cnt[s])
res = []
for i in arr:
if cnt[i] == mx:
res.append(i)
res.sort()
for i in res:
print(i) | from collections import Counter
n, cnt, mx, arr = int(input()), Counter(), -1, []
for i in range(n):
s = input()
arr.append(s)
cnt[s] += 1
mx = max(mx,cnt[s])
res = []
for i in arr:
if cnt[i] == mx:
res.append(i)
cnt[i] = 0
res.sort()
for i in res:
print(i) | [
"assignment.add"
] | 571,260 | 571,261 | u912245812 | python |
p02773 | N=int(input())
L=[input() for i in range(N)]
L.sort()
c=1
memo=0
ans=[]
for i in range(1,N):
if L[i]==L[i-1]:
c+=1
else:
if c==memo:
ans.append(L[i-1])
elif c>memo:
ans.clear()
ans.append(L[i-1])
memo=c
c=1
if c==memo:
ans.append(L[N-1])
else:
ans.clear()
ans.append(L[N... | N=int(input())
L=[input() for i in range(N)]
L.sort()
c=1
memo=0
ans=[]
for i in range(1,N):
if L[i]==L[i-1]:
c+=1
else:
if c==memo:
ans.append(L[i-1])
elif c>memo:
ans.clear()
ans.append(L[i-1])
memo=c
c=1
if c==memo:
ans.append(L[N-1])
elif c>memo:
ans.clear()
ans.app... | [
"control_flow.branch.if.condition.change"
] | 571,264 | 571,265 | u444082822 | python |
p02773 | n = int(input())
d = {}
for _ in range(n):
s = input()
if not s in d:
d[s] = 1
else:
d[s] += 1
d_max = max(d.values())
ans = [k for k, v in d.items() if v == d_max]
for a in ans:
print (a) | n = int(input())
d = {}
for _ in range(n):
s = input()
if s in d:
d[s] += 1
else:
d[s] = 1
d_max = max(d.values())
ans = [k for k, v in d.items() if v == d_max]
for a in sorted(ans):
print (a) | [
"control_flow.branch.if.condition.change",
"assignment.value.change",
"call.add",
"call.arguments.change"
] | 571,268 | 571,269 | u422272120 | python |
p02773 | n = int(input())
d = {}
for _ in range(n):
s = input()
if not s in d:
d[s] = 1
else:
d[s] += 1
d_max = max(d.values())
ans = [k for k, v in d.items() if v == d_max]
for a in ans:
print (a) | n = int(input())
d = {}
for _ in range(n):
s = input()
if not s in d:
d[s] = 1
else:
d[s] += 1
d_max = max(d.values())
ans = [k for k, v in d.items() if v == d_max]
for a in sorted(ans):
print (a)
| [
"call.add",
"call.arguments.change"
] | 571,268 | 571,270 | u422272120 | python |
p02773 | n=int(input())
s={}
for i in range(n):
wd=input()
if wd in s:
s[wd]+=1
else:
s[wd]=1
mx=max(s.values())
ans=[]
for i in s.keys():
if s[i]==mx:
ans.append(i)
for i in ans:
print(i)
| n=int(input())
s={}
for i in range(n):
wd=input()
if wd in s:
s[wd]+=1
else:
s[wd]=1
mx=max(s.values())
ans=[]
for i in s.keys():
if s[i]==mx:
ans.append(i)
ans.sort()
for i in ans:
print(i)
| [
"call.add"
] | 571,271 | 571,272 | u404629709 | python |
p02773 | N=int(input())
S = []
for j in range(N):
S.append(input())
from collections import Counter
S2=collections.Counter(S)
S1=S2.most_common()
S3=[]
S3.append(S1[0][0])
for i in range(1,len(S1)):
if S1[i][1]==S1[0][1]:
S3.append(S1[i][0])
else:
break
S3=sorted(S3)
for i in range(0, len(S3)):
... | N=int(input())
S = []
for j in range(N):
S.append(input())
import collections
S2=collections.Counter(S)
S1=S2.most_common()
S3=[]
S3.append(S1[0][0])
for i in range(1,len(S1)):
if S1[i][1]==S1[0][1]:
S3.append(S1[i][0])
else:
break
S3=sorted(S3)
for i in range(0, len(S3)):
print(S3[i]) | [] | 571,273 | 571,274 | u239653493 | python |
p02773 | N = int(input())
S = []
maxnum = 0
maxyouso = {}
anslist = []
for kai in range (N):
S.append(input())
for moji in S:
if moji not in maxyouso:
maxyouso[moji] = 1
else:
maxyouso[moji] = maxyouso[moji] + 1
print(maxyouso)
for num in maxyouso:
if maxyouso[num] > maxnum:
maxnum = maxy... | N = int(input())
S = []
maxnum = 0
maxyouso = {}
anslist = []
for kai in range (N):
S.append(input())
for moji in S:
if moji not in maxyouso:
maxyouso[moji] = 1
else:
maxyouso[moji] = maxyouso[moji] + 1
for num in maxyouso:
if maxyouso[num] > maxnum:
maxnum = maxyouso[num]
for nu... | [
"call.remove"
] | 571,283 | 571,284 | u795928154 | python |
p02773 | from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(s for k, v in S.items() if v == m):
print(v) | from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
print(v) | [
"identifier.change"
] | 571,295 | 571,296 | u327532412 | python |
p02773 | from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(s for k, v in S.items() if k == m):
print(v) | from collections import Counter
N = int(input())
S = Counter(input() for _ in range(N))
m = max(S.values())
for v in sorted(k for k, v in S.items() if v == m):
print(v) | [
"identifier.change"
] | 571,297 | 571,296 | u327532412 | python |
p02773 | n=int(input())
s=[input() for i in range(n)]
s.sort()
cnt=1
ans=0
pri=[]
for i in range(n-1):
if s[i]==s[i+1]:
cnt+=1
else:
ans=max(cnt,ans)
cnt=1
ans=max(cnt,ans)
cnt=1
for i in range(n-1):
if s[i]==s[i+1]:
cnt+=1
else:
if cnt==ans:
pri.append(s[i])
... | n=int(input())
s=[input() for i in range(n)]
s.sort()
cnt=1
ans=0
pri=[]
for i in range(n-1):
if s[i]==s[i+1]:
cnt+=1
else:
ans=max(cnt,ans)
cnt=1
ans=max(cnt,ans)
cnt=1
for i in range(n-1):
if s[i]==s[i+1]:
cnt+=1
else:
if cnt==ans:
pri.append(s[i])
... | [
"call.remove"
] | 571,302 | 571,303 | u403331159 | python |
p02773 | n = int(input())
words = {}
for i in range(n) :
new_word = input()
if new_word in words.keys() :
words[new_word] += 1
else :
words[new_word] = 1
mx_freq = max(words.values())
mx_words = [k for k in words.items() if words[k] == mx_freq]
mx_words.sort()
for mx_word in mx_words :
print(... | n = int(input())
words = {}
for i in range(n) :
new_word = input()
if new_word in words.keys() :
words[new_word] += 1
else :
words[new_word] = 1
mx_freq = max(words.values())
mx_words = [k for k in words.keys() if words[k] == mx_freq]
mx_words.sort()
for mx_word in mx_words :
print(m... | [
"assignment.value.change",
"identifier.change"
] | 571,306 | 571,307 | u049979154 | python |
p02773 | n = int(input())
words = {}
for i in range(n) :
new_word = input()
if new_word in words.keys() :
words[new_word] += 1
else :
words[new_word] = 1
mx_freq = max(words.values())
mx_words = [k for k in words.items() if words[k] == mx_freq]
mx_words.sort()
for mx_word in mx_words :
print(... | n = int(input())
words = {}
for i in range(n) :
new_word = input()
if new_word in words.keys() :
words[new_word] += 1
else :
words[new_word] = 1
mx_freq = max(words.values())
mx_words = [k for k, v in words.items() if words[k] == mx_freq]
mx_words.sort()
for mx_word in mx_words :
pri... | [] | 571,306 | 571,308 | u049979154 | python |
p02773 | import sys
from collections import Counter
read = sys.stdin.read
N, *S = map(str, read().split())
s = Counter(S)
n = max(s.values())
answer = [i for i, j in s if j == n]
answer.sort()
print('\n'.join(answer))
| import sys
from collections import Counter
read = sys.stdin.read
N, *S = map(str, read().split())
s = Counter(S)
n = max(s.values())
answer = [i for i, j in s.items() if j == n]
answer.sort()
print('\n'.join(answer))
| [
"call.add"
] | 571,309 | 571,310 | u945181840 | python |
p02773 | from itertools import groupby
from itertools import itemgetter
a = groupby(sorted(input() for _ in range(int(input()))))
a = [(len(tuple(g)), s) for s, g in a]
m = max(a, key=itemgetter(0))[0]
for k, s in a:
if k == m:
print(s)
| from itertools import groupby
from operator import itemgetter
a = groupby(sorted(input() for _ in range(int(input()))))
a = [(len(tuple(g)), s) for s, g in a]
m = max(a, key=itemgetter(0))[0]
for k, s in a:
if k == m:
print(s)
| [
"identifier.change"
] | 571,324 | 571,325 | u021019433 | python |
p02773 | from itertools import groupby
from iterator import itemgetter
a = groupby(sorted(input() for _ in range(int(input()))))
a = [(len(tuple(g)), s) for s, g in a]
m = max(a, key=itemgetter(0))[0]
for k, s in a:
if k == m:
print(s)
| from itertools import groupby
from operator import itemgetter
a = groupby(sorted(input() for _ in range(int(input()))))
a = [(len(tuple(g)), s) for s, g in a]
m = max(a, key=itemgetter(0))[0]
for k, s in a:
if k == m:
print(s)
| [
"identifier.change"
] | 571,326 | 571,325 | u021019433 | python |
p02773 | def main():
n = int(input())
words = {}
for _ in range(n):
a = input()
if a in words:
words[a] += 1
else:
words[a] = 1
max_val = max(words.values())
# words_sorted = sorted(words.items(), key=lambda x: x[0])
for key, value in sorted(words):
... | def main():
n = int(input())
words = {}
for _ in range(n):
a = input()
if a in words:
words[a] += 1
else:
words[a] = 1
max_val = max(words.values())
# words_sorted = sorted(words.items(), key=lambda x: x[0])
for key, value in sorted(words.items())... | [
"call.add"
] | 571,329 | 571,330 | u171132311 | python |
p02773 | # C - Poll
from collections import Counter
def main():
_, *S = open(0).read().split()
cnt = Counter(S)
max_votes = max(cnt)
ans = [k for k, v in cnt.items() if v == max_votes]
ans.sort()
print("\n".join(ans))
if __name__ == "__main__":
main()
| # C - Poll
from collections import Counter
def main():
_, *S = open(0).read().split()
cnt = Counter(S)
max_votes = max(cnt.values())
ans = [k for k, v in cnt.items() if v == max_votes]
ans.sort()
print("\n".join(ans))
if __name__ == "__main__":
main()
| [
"call.add"
] | 571,333 | 571,334 | u077291787 | python |
p02773 | N = int(input())
A = [input() for i in range(N)]
d = dict()
m = 0
for i in range(N):
if A[i] in d:
d[A[i]] = d[A[i]] + 1
if m < d[A[i]]:
m = d[A[i]]
else:
d[A[i]] = 1
ans = []
keys = list(d.keys())
for i in range(len(keys)):
if m == d[keys[i]]:
ans.append(keys... | N = int(input())
A = [input() for i in range(N)]
d = dict()
m = 1
for i in range(N):
if A[i] in d:
d[A[i]] = d[A[i]] + 1
if m < d[A[i]]:
m = d[A[i]]
else:
d[A[i]] = 1
ans = []
keys = list(d.keys())
for i in range(len(keys)):
if m == d[keys[i]]:
ans.append(keys... | [
"literal.number.integer.change",
"assignment.value.change"
] | 571,335 | 571,336 | u133833119 | python |
p02773 | n = int(input())
lis = []
lis2 = {}
lis3 = []
for _ in range(n):
lis.append(input())
for w in lis:
if w not in lis2.keys():
lis2[w] = 1
else:
lis2[w] += 1
ma = max(lis2.values())
for k, v in lis2.items():
if v == ma:
lis3.append(k)
for a in lis3:
print(a) | n = int(input())
lis = []
lis2 = {}
lis3 = []
for _ in range(n):
lis.append(input())
for w in lis:
if w not in lis2.keys():
lis2[w] = 1
else:
lis2[w] += 1
ma = max(lis2.values())
for k, v in lis2.items():
if v == ma:
lis3.append(k)
lis3.sort()
for a in lis3:
print(a) | [
"call.add"
] | 571,343 | 571,344 | u840570107 | python |
p02773 | from collections import Counter
n = input()
s = [input() for _ in range(n)]
s = Counter(s)
m = max(s.values())
a = []
for d in s.items():
if d[1] == m:
a.append(d[0])
for s in a:
print(s) | from collections import Counter
n = int(input())
s = [input() for _ in range(n)]
s = Counter(s)
m = max(s.values())
a = []
for d in s.items():
if d[1] == m:
a.append(d[0])
for s in sorted(a):
print(s) | [
"call.add",
"call.arguments.change"
] | 571,354 | 571,355 | u977141657 | python |
p02773 | from collections import Counter
N = int(input())
S = [0]*N
for i in range(N):
S[i] = input()
S.sort()
c = Counter(S)
m_num = c.most_common()[0][1]
for s in set(S):
if c[s] == m_num:
print(s) | from collections import Counter
N = int(input())
S = [0]*N
for i in range(N):
S[i] = input()
S.sort()
c = Counter(S)
m_num = c.most_common()[0][1]
for s in sorted(list(set(S))):
if c[s] == m_num:
print(s) | [
"call.add",
"call.arguments.add"
] | 571,358 | 571,359 | u078349616 | python |
p02773 | import collections as col
n=int(input())
s=[input() for i in range(n)]
c = col.Counter(s)
max = max(c.values())
ans = []
for key,val in c.items():
if val == max:
ans.append(key)
for i in ans:
print(i)
| import collections as col
n=int(input())
s=[input() for i in range(n)]
c = col.Counter(s)
max = max(c.values())
ans = []
for key,val in c.items():
if val == max:
ans.append(key)
ans.sort()
for i in ans:
print(i)
| [
"call.add"
] | 571,362 | 571,363 | u428747123 | python |
p02773 | N = int(input())
Sdict = dict()
max = 0
for _ in range(N):
s = input()
if s in Sdict:
Sdict[s] += 1
else:
Sdict[s] = 0
maxi = 0
lis = []
for k,v in Sdict.items():
if v > maxi:
lis = [k]
maxi = v
if v == maxi:
lis.append(k)
lis.sort()
for k in lis:
pr... | N = int(input())
Sdict = dict()
max = 0
for _ in range(N):
s = input()
if s in Sdict:
Sdict[s] += 1
else:
Sdict[s] = 0
maxi = 0
lis = []
for k,v in Sdict.items():
if v > maxi:
lis = [k]
maxi = v
elif v == maxi:
lis.append(k)
lis.sort()
for k in lis:
... | [
"control_flow.branch.if.replace.remove",
"control_flow.branch.else_if.replace.add"
] | 571,368 | 571,369 | u227476288 | python |
p02773 | import collections
n = int(input())
List = [input() for i in range(n)]
res = []
c = collections.Counter(List)
m = 0
for v in c.values():
m = max(m, v)
for k, v in c.items():
if v == m:
res.append(k)
res.sort()
for i in range(les(res)):
print(res[i]) | import collections
n = int(input())
List = [input() for i in range(n)]
res = []
c = collections.Counter(List)
m = 0
for v in c.values():
m = max(m, v)
for k, v in c.items():
if v == m:
res.append(k)
res.sort()
for i in range(len(res)):
print(res[i]) | [
"identifier.change",
"call.function.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 571,370 | 571,371 | u840974625 | python |
p02773 | import collections
n = int(input())
List = [input() for i in range(n)]
res = []
c = collections.Counter(List)
for v in c.values():
m = max(m, v)
for k, v in c.items():
if v == m:
res.append(k)
res.sort()
for i in range(les(res)):
print(res[i]) | import collections
n = int(input())
List = [input() for i in range(n)]
res = []
c = collections.Counter(List)
m = 0
for v in c.values():
m = max(m, v)
for k, v in c.items():
if v == m:
res.append(k)
res.sort()
for i in range(len(res)):
print(res[i]) | [
"identifier.change",
"call.function.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 571,372 | 571,371 | u840974625 | python |
p02773 | def contest(N, str):
count = {}
for s in str:
if s not in count:
count[s] = 1
else:
count[s] += 1
ret = sorted(count.items(),key=lambda count: count[1], reverse=True)
maxnum = ret[0][1]
retVal = []
for r in ret:
if r[1] == maxnum:
... | def contest(N, str):
count = {}
for s in str:
if s not in count:
count[s] = 1
else:
count[s] += 1
ret = sorted(count.items(),key=lambda count: count[1], reverse=True)
maxnum = ret[0][1]
retVal = []
for r in ret:
if r[1] == maxnum:
... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 571,373 | 571,374 | u376270730 | python |
p02773 | #from math import sqrt
#from heapq import heappush, heappop
#from collections import deque
n = int(input())
l = []
for _ in range(n):
s = input()
l.append(s)
l.sort()
max_count = 0
count = 0
results = []
ps = None
for s in l:
if s == ps or ps is None:
count += 1
else:
if max_count < ... | #from math import sqrt
#from heapq import heappush, heappop
#from collections import deque
n = int(input())
l = []
for _ in range(n):
s = input()
l.append(s)
l.sort()
max_count = 0
count = 0
results = []
ps = None
for s in l:
if s == ps or ps is None:
count += 1
else:
if max_count < ... | [
"call.remove"
] | 571,390 | 571,391 | u006883624 | python |
p02773 | dic={}
n=int(input())
d=[]
for i in range(n):
d.append(input())
if d[-1] in dic:
dic[d[-1]]+=1
else:
dic[d[-1]]=1
mx=max(mx,dic.values())
for k,v in sorted(dic.items(),key=lambda x:(-x[1],x[0])):
if mx==v:
print(k)
| dic={}
n=int(input())
d=[]
for i in range(n):
d.append(input())
if d[-1] in dic:
dic[d[-1]]+=1
else:
dic[d[-1]]=1
mx=max(dic.values())
for k,v in sorted(dic.items(),key=lambda x:(-x[1],x[0])):
if mx==v:
print(k)
| [
"call.arguments.change"
] | 571,399 | 571,400 | u926678805 | python |
p02773 | N = int(input())
S = list()
for _ in range(N):
S.append(input())
S_set = set(S)
S_dict = dict()
for s in S_set:
S_dict[s] = 0
for val in S:
S_dict[val] += 1
max_num = max(S_dict.values())
ans = list()
for k, v in S_dict.items():
if v == max_num:
ans.append(k)
sorted(ans)
for res in ans:
pr... | N = int(input())
S = list()
for _ in range(N):
S.append(input())
S_set = set(S)
S_dict = dict()
for s in S_set:
S_dict[s] = 0
for val in S:
S_dict[val] += 1
max_num = max(S_dict.values())
ans = list()
for k, v in S_dict.items():
if v == max_num:
ans.append(k)
ans = sorted(ans)
for res in ans:
... | [
"assignment.add"
] | 571,401 | 571,402 | u435108403 | python |
p02773 | from collections import Counter
N = int(input())
list = [input() for _ in range(0,N)]
counted = Counter(list)
res_max= counted.most_common()[0][1]
print(res_max)
ans = []
for k, v in counted.items():
if v == res_max:
ans.append(k)
ans.sort()
print(*ans, sep="\n")
| from collections import Counter
N = int(input())
list = [input() for _ in range(0,N)]
counted = Counter(list)
res_max= counted.most_common()[0][1]
ans = []
for k, v in counted.items():
if v == res_max:
ans.append(k)
ans.sort()
print(*ans, sep="\n") | [
"call.remove"
] | 571,403 | 571,404 | u232873434 | python |
p02773 | N = int(input())
S = [input() for i in range(N)]
s = sorted(S)
import collections
c = collections.Counter(s)
C = c.most_common()
a = C[0][1]
b = []
for i in range(N):
if a == C[i][1]:
b.append(C[i][0])
else:
break
B = sorted(b)
for i in B:
print(i) | N = int(input())
S = [input() for i in range(N)]
s = sorted(S)
import collections
c = collections.Counter(s)
C = c.most_common()
a = C[0][1]
b = []
for i in range(len(C)):
if a == C[i][1]:
b.append(C[i][0])
else:
break
B = sorted(b)
for i in B:
print(i) | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 571,414 | 571,415 | u185424824 | python |
p02773 | import collections
N = int(input())
A=[input() for i in range(N)]
c = collections.Counter(A)
values, counts = zip(*c.most_common())
k = max (counts)
l =counts.count(k)
V = []
for i in range(l):
V.append(values[i])
sorted(V)
for j in range(len(V)):
print(V[j]) | import collections
N = int(input())
A=[input() for i in range(N)]
c = collections.Counter(A)
values, counts = zip(*c.most_common())
k = max (counts)
l =counts.count(k)
V = []
for i in range(l):
V.append(values[i])
L = sorted(V)
for j in range(len(L)):
print(L[j]) | [
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"io.output.change"
] | 571,418 | 571,419 | u487594898 | python |
p02773 | N = int(input())
d_count = {}
for i in range(N):
S = str(input())
d_count.setdefault(S, 0)
d_count[S] = d_count[S] + 1
print(d_count)
max = 0
maxlist = []
for S in d_count:
if(max < d_count[S] ):
max = d_count[S]
maxlist = [S]
if(max == d_count[S]):
maxlist.append(S)
maxli... | N = int(input())
d_count = {}
for i in range(N):
S = str(input())
d_count.setdefault(S, 0)
d_count[S] = d_count[S] + 1
max = 0
maxlist = []
for S in d_count:
if(max < d_count[S] ):
max = d_count[S]
maxlist = [S]
if(max == d_count[S]):
maxlist.append(S)
maxlist_set = list(s... | [
"call.remove"
] | 571,429 | 571,430 | u064264248 | python |
p02773 | N = int(input())
S = []
for i in range(N):
S.append(input())
import collections
c = collections.Counter(S).most_common()
a=c[0][1]
ans=[]
for i in range(len(c)):
if a==c[i][1]:
ans.append(c[i][0])
else:
exit()
ans.sort()
for i in range(len(ans)):
print(ans[i]) | N = int(input())
S = []
for i in range(N):
S.append(input())
import collections
c = collections.Counter(S).most_common()
a=c[0][1]
ans=[]
for i in range(len(c)):
if a==c[i][1]:
ans.append(c[i][0])
else:
break
ans.sort()
for i in range(len(ans)):
print(ans[i]) | [
"control_flow.exit.remove",
"control_flow.break.add",
"call.arguments.change"
] | 571,433 | 571,434 | u919025034 | python |
p02773 | n=int(input())
a=[]
for i in range(n):
a.append(str(input()))
a=sorted(a)
b=[]
c=[]
tmp="."
count=0
for i in range(n):
if tmp != a[i]:
b.append(tmp)
c.append(count)
tmp=a[i]
count=1
else:
count += 1
b.append(tmp)
c.append(count)
k=sorted(c)[0]
for i in range(len(b)):
if c[i]==k:
pri... | n=int(input())
a=[]
for i in range(n):
a.append(str(input()))
a=sorted(a)
b=[]
c=[]
tmp="."
count=0
for i in range(n):
if tmp != a[i]:
b.append(tmp)
c.append(count)
tmp=a[i]
count=1
else:
count += 1
b.append(tmp)
c.append(count)
k=sorted(c)[-1]
for i in range(len(b)):
if c[i]==k:
pr... | [
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.unary.add"
] | 571,435 | 571,436 | u954488273 | python |
p02773 | N = int(input())
S = [0]*N
for i in range(N):
S[i] = input()
from collections import defaultdict
counter = defaultdict(int)
for x in S:
counter[x] += 1
X = counter[max(counter)]
s = set(S)
ans=[]
for i in s:
if counter[i] == X:
ans.append(i)
for i in sorted(ans):
print(i) | N = int(input())
S = [0]*N
for i in range(N):
S[i] = input()
from collections import defaultdict
counter = defaultdict(int)
for x in S:
counter[x] += 1
X = max(counter.values())
s = set(S)
ans=[]
for i in s:
if counter[i] == X:
ans.append(i)
for i in sorted(ans):
print(i) | [
"call.add"
] | 571,439 | 571,440 | u212786022 | python |
p02773 | from collections import Counter
N = int(input())
ss = []
for i in range(N):
ss.append(input())
c = Counter(ss)
max_count = max(c.values())
out_k = []
for k, v in c.items():
if v == max_count:
out_k.append(k)
sort(out_k)
for k in out_k:
print(k) | from collections import Counter
N = int(input())
ss = []
for i in range(N):
ss.append(input())
c = Counter(ss)
max_count = max(c.values())
out_k = []
for k, v in c.items():
if v == max_count:
out_k.append(k)
out_k.sort()
for k in out_k:
print(k) | [
"call.arguments.change"
] | 571,444 | 571,445 | u595952233 | python |
p02773 | N = int(input())
paper = [input() for i in range(N)]
D = {}
for p in paper:
if p not in D:
D[p] = 1
else:
D[p] += 1
key = 0
max_value = 0
k = []
# 辞書の値を取り出す
for i in D:
if D[i] > max_value:
max_value = D[i]
key = i
elif D[i] == max_value:
k.append(i)
if len(k) ... | N = int(input())
paper = [input() for i in range(N)]
D = {}
for p in paper:
if p not in D:
D[p] = 1
else:
D[p] += 1
key = 0
max_value = 0
k = []
# 辞書の値を取り出す
for i in D:
if D[i] > max_value:
max_value = D[i]
key = i
k = []
elif D[i] == max_value:
k.append... | [
"assignment.add"
] | 571,453 | 571,454 | u162893962 | python |
p02773 | import collections
N = int(input())
a = []
for i in range(N):
a.append(str(input()))
a = collections.Counter(a)
b = max(a.values())
max_k_list = [kv[0] for kv in a.items() if kv[1] == b]
mak_k_list = sorted(max_k_list)
for i in max_k_list:
print(i) | import collections
N = int(input())
a = []
for i in range(N):
a.append(str(input()))
a = collections.Counter(a)
b = max(a.values())
max_k_list = [kv[0] for kv in a.items() if kv[1] == b]
max_k_list = sorted(max_k_list)
for i in max_k_list:
print(i) | [
"assignment.variable.change",
"identifier.change"
] | 571,455 | 571,456 | u025287757 | python |
p02773 | n = int(input())
s = [input() for i in range(n)]
d = {}
for i in s:
if i in d.keys():
d[i]=d[i]+1
else:
d[i]=1
d_sorted = sorted(d.items(), key=lambda x:x[1])
d_name = [x[0] for x in d_sorted if x[1] == d_sorted[-1][0]]
d_name.sort()
print("\n".join(d_name)) | n = int(input())
s = [input() for i in range(n)]
d = {}
for i in s:
if i in d.keys():
d[i]=d[i]+1
else:
d[i]=1
d_sorted = sorted(d.items(), key=lambda x:x[1])
d_name = [x[0] for x in d_sorted if x[1] == d_sorted[-1][1]]
d_name.sort()
print("\n".join(d_name)) | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 571,471 | 571,472 | u821775079 | python |
p02773 | import collections
from collections import Counter
n=int(input())
string_list=[input() for i in range(n)]
c = collections.Counter(string_list)
max = c.most_common()[0][1]
list = []
for i in c.items():
if i[1] == max:
list.append(i[0])
for i in reversed(list):
print(i) | import collections
from collections import Counter
n=int(input())
string_list=[input() for i in range(n)]
c = collections.Counter(string_list)
max = c.most_common()[0][1]
list = []
# print("-------")
for i in c.items():
if i[1] == max:
list.append(i[0])
for i in sorted(list):
print(i)
| [
"identifier.change",
"call.function.change"
] | 571,475 | 571,476 | u671239754 | python |
p02773 | from collections import Counter
N = int(input())
S = [str(input()) for i in range(N)]
X = Counter(S)
ans = X.most_common()
p = ans[0][1]
A = [i[0] for i in X.items() if i[1] == p]
for i in range(len(A)):
print(A[i]) | from collections import Counter
N = int(input())
S = [str(input()) for i in range(N)]
X = Counter(S)
ans = X.most_common()
p = ans[0][1]
A = [i[0] for i in X.items() if i[1] == p]
A.sort()
for i in range(len(A)):
print(A[i]) | [
"call.add"
] | 571,481 | 571,482 | u297046168 | python |
p02773 | def main():
N = int(input())
count = dict()
for i in range(N):
s = input()
try:
count[s] += 1
except:
count[s] = 1
sort_ = sorted(count.items(), key=lambda x:x[0], reverse=True)
max_value = sort_[0][1]
item = []
for key,value in sort_:
... | def main():
N = int(input())
count = dict()
for i in range(N):
s = input()
try:
count[s] += 1
except:
count[s] = 1
sort_ = sorted(count.items(), key=lambda x:x[1], reverse=True)
max_value = sort_[0][1]
item = []
for key,value in sort_:
... | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"call.remove"
] | 571,483 | 571,484 | u801049006 | python |
p02773 | from collections import Counter
from itertools import takewhile
n=int(input())
s=[input() for _ in range(n)]
count=Counter(s)
v=count.most_common()[0][-1]
it=takewhile(lambda kv: kv[-1]==v,count.most_common())
for t in list(it):
print(t[0]) | from collections import Counter
from itertools import takewhile
n=int(input())
s=[input() for _ in range(n)]
count=Counter(s)
v=count.most_common()[0][-1]
it=takewhile(lambda kv: kv[-1]==v,count.most_common())
for t in sorted(list(it)):
print(t[0]) | [
"call.add",
"call.arguments.change"
] | 571,485 | 571,486 | u583455650 | python |
p02773 | import collections
import itertools
s=int(input())
l=[input() for i in range(s)]
counter = collections.Counter(l)
mode_v = counter.most_common()[0][-1]
it = itertools.takewhile(
lambda kv: kv[-1] == mode_v, counter.most_common()
)
u=[]
for k, v in it:
u.append(k)
u.sort
for i in range(len(u)):
print(u[i]) | import collections
import itertools
s=int(input())
l=[input() for i in range(s)]
counter = collections.Counter(l)
mode_v = counter.most_common()[0][-1]
it = itertools.takewhile(
lambda kv: kv[-1] == mode_v, counter.most_common()
)
u=[]
for k, v in it:
u.append(k)
u.sort()
for i in range(len(u)):
print(u[i]) | [
"call.add"
] | 571,493 | 571,494 | u917558625 | python |
p02773 | num = int(input())
i = [int(input()) for _ in range(num)]
count_dict = {}
for ele in i:
if ele not in count_dict:
count_dict[ele] = 1
else:
count_dict[ele] += 1
max_count = max(count_dict.values())
max_str = [a for a in count_dict if count_dict[a] == max_count]
for string in sorted(max_str):
print(strin... | num = int(input())
i = [input() for _ in range(num)]
count_dict = {}
for ele in i:
if ele not in count_dict:
count_dict[ele] = 1
else:
count_dict[ele] += 1
max_count = max(count_dict.values())
max_str = [a for a in count_dict if count_dict[a] == max_count]
for string in sorted(max_str):
print(string) | [
"call.remove",
"call.arguments.change"
] | 571,495 | 571,496 | u499106786 | python |
p02773 | num = int(input())
i = [int(input()) for _ in range(num)]
count_dict = {}
for ele in i:
if ele not in count_dict:
count_dict[ele] = 1
else:
count_dict[ele] += 1
max_count = max(count_dict.values())
max_str = [a for a in count_dict if count_dict[a] == max_count]
for string in sorted(max_str):
print(s... | num = int(input())
i = [input() for _ in range(num)]
count_dict = {}
for ele in i:
if ele not in count_dict:
count_dict[ele] = 1
else:
count_dict[ele] += 1
max_count = max(count_dict.values())
max_str = [a for a in count_dict if count_dict[a] == max_count]
for string in sorted(max_str):
print(string) | [
"call.remove",
"call.arguments.change"
] | 571,497 | 571,496 | u499106786 | python |
p02773 | from collections import Counter
a = int(input())
a_list = []
ans_list = []
for i in range(a):
a_list.append(input())
a_counter = Counter(a_list)
_v = 0
for k, v in a_counter.most_common():
if _v == 0 or _v == v:
_v = v
ans_list.append(k)
elif _v > v:
break
ans = sorted(ans_list)
print(a... | from collections import Counter
a = int(input())
a_list = []
ans_list = []
for i in range(a):
a_list.append(input())
a_counter = Counter(a_list)
_v = 0
for k, v in a_counter.most_common():
if _v == 0 or _v == v:
_v = v
ans_list.append(k)
elif _v > v:
break
ans = sorted(ans_list)
for i i... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 571,500 | 571,501 | u756030237 | python |
p02773 | from collections import Counter
N=int(input()) #1行目のNを取得する
S=[input() for i in range(N)] #複数行の数値の入力を取得
most_common_list=Counter(S).most_common()
common_s=[]
for i in range(len(most_common_list)):
if most_common_list[i][1]==most_common_list[0][1]:
common_s.append(most_common_list[i][0])
else:
... | from collections import Counter
N=int(input()) #1行目のNを取得する
S=[input() for i in range(N)] #複数行の数値の入力を取得
most_common_list=Counter(S).most_common()
common_s=[]
for i in range(len(most_common_list)):
if most_common_list[i][1]==most_common_list[0][1]:
common_s.append(most_common_list[i][0])
else:
... | [
"identifier.change",
"call.function.change"
] | 571,504 | 571,505 | u616169109 | python |
p02773 | import collections
n = int(input())
s = []
for i in range(n):
s.append(input())
c = collections.Counter(s)
max_c = c[max(c)]
keys = [k for k, v in c.items() if v == max_c]
keys.sort()
for k in keys:
print(k)
|
import collections
n = int(input())
s = []
for i in range(n):
s.append(input())
c = collections.Counter(s)
max_c = max(c.values())
keys = [k for k, v in c.items() if v == max_c]
keys.sort()
for k in keys:
print(k)
| [
"call.add"
] | 571,508 | 571,509 | u855781168 | python |
p02773 | n = int(input())
S = list(str(input()) for i in range(n))
SortedS = sorted(S) #辞書式にソート
s = [] #各文字列の回数
S2 = [] #各文字列
count = 1
for i in range(n - 1):
if i == n - 2 and SortedS[i] != SortedS[i + 1]:
s.append(count)
s.append(1)
S2.append(SortedS[i])
S2.append(SortedS[i + 1])
... | n = int(input())
S = list(str(input()) for i in range(n))
SortedS = sorted(S) #辞書式にソート
s = [] #各文字列の回数
S2 = [] #各文字列
count = 1
for i in range(n - 1):
if i == n - 2 and SortedS[i] != SortedS[i + 1]:
s.append(count)
s.append(1)
S2.append(SortedS[i])
S2.append(SortedS[i + 1])
... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 571,524 | 571,525 | u104005543 | python |
p02773 | n = int(input())
S = list(str(input()) for i in range(n))
SortedS = sorted(S) #辞書式にソート
s = [] #各文字列の回数
S2 = [] #各文字列
count = 1
for i in range(n - 1):
if i == n - 2 and SortedS[i] != SortedS[i + 1]:
s.append(count)
s.append(1)
S2.append(SortedS[i])
S2.append(SortedS[i + 1])
... | n = int(input())
S = list(str(input()) for i in range(n))
SortedS = sorted(S) #辞書式にソート
s = [] #各文字列の回数
S2 = [] #各文字列
count = 1
for i in range(n - 1):
if i == n - 2 and SortedS[i] != SortedS[i + 1]:
s.append(count)
s.append(1)
S2.append(SortedS[i])
S2.append(SortedS[i + 1])
... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 571,526 | 571,525 | u104005543 | python |
p02773 | import sys
import collections
N = int(input())
S = []
for _ in range(N):
S.append(input())
c = collections.Counter(S)
a = c.most_common()
s = c.most_common()[0][1]
ans = []
for i in a:
if i[1] == s:
print(i[0])
sys.stdout.flush | import sys
import collections
N = int(input())
S = []
for _ in range(N):
S.append(input())
c = collections.Counter(S)
a = c.most_common()
s = c.most_common()[0][1]
ans = []
for i in sorted(a):
if i[1] == s:
print(i[0])
sys.stdout.flush | [
"call.add",
"call.arguments.change"
] | 571,539 | 571,540 | u572425901 | python |
p02773 | N = int(input())
Ss = {}
for _ in range(N):
s = input()
if s in Ss:
Ss[s] += 1
else:
Ss[s] = 1
max_value = max(Ss.values()) # maximum value
max_keys = [k for k, v in Ss.items() if v == max_value]
for k in max_keys:
print(k)
| N = int(input())
Ss = {}
for _ in range(N):
s = input()
if s in Ss:
Ss[s] += 1
else:
Ss[s] = 1
max_value = max(Ss.values()) # maximum value
max_keys = [k for k, v in Ss.items() if v == max_value]
for k in sorted(max_keys):
print(k)
| [
"call.add",
"call.arguments.change"
] | 571,543 | 571,544 | u210543511 | python |
p02773 | N = int(input())
dic = {}
for i in range(N):
key = input()
if key not in dic:
dic[key] = 1
else:
dic[key] +=1
maxnum = max(dic.values())
#print(maxnum)
#print(dic)
keys = list(dic.keys())
for key in reversed(keys):
if dic[key] == maxnum:
print(key)
| N = int(input())
dic = {}
for i in range(N):
key = input()
if key not in dic:
dic[key] = 1
else:
dic[key] +=1
maxnum = max(dic.values())
#print(maxnum)
#print(dic)
keys = list(dic.keys())
for key in sorted(keys):
if dic[key] == maxnum:
print(key)
| [
"identifier.change",
"call.function.change"
] | 571,558 | 571,559 | u561859676 | python |
p02773 | N = int(input())
dic = {}
for i in range(N):
key = input()
if key not in dic:
dic[key] = 0
else:
dic[key] +=1
maxnum = max(dic.values())
keys = list(dic.keys())
for key in reversed(keys):
if dic[key] == maxnum:
print(key)
| N = int(input())
dic = {}
for i in range(N):
key = input()
if key not in dic:
dic[key] = 1
else:
dic[key] +=1
maxnum = max(dic.values())
#print(maxnum)
#print(dic)
keys = list(dic.keys())
for key in sorted(keys):
if dic[key] == maxnum:
print(key)
| [
"literal.number.integer.change",
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 571,560 | 571,559 | u561859676 | python |
p02773 | print()
N = int(input())
dic = {}
for i in range(N):
key = input()
if key not in dic:
dic[key] = 0
else:
dic[key] +=1
maxnum = max(dic.values())
keys = list(dic.keys())
for key in reversed(keys):
if dic[key] == maxnum:
print(key)
| N = int(input())
dic = {}
for i in range(N):
key = input()
if key not in dic:
dic[key] = 1
else:
dic[key] +=1
maxnum = max(dic.values())
#print(maxnum)
#print(dic)
keys = list(dic.keys())
for key in sorted(keys):
if dic[key] == maxnum:
print(key)
| [
"call.remove",
"literal.number.integer.change",
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 571,561 | 571,559 | u561859676 | python |
p02773 | from collections import Counter
N = int(input())
arr = []
arr_max = []
for i in range(N):
arr.append(input())
dic = Counter(arr)
inverse = [(value, key) for key, value in dic.items()]
max_s = max(inverse)[0]
for key,value in dic.items():
if value == max_s:
arr_max.append(key)
else: continue
for j i... | from collections import Counter
N = int(input())
arr = []
arr_max = []
for i in range(N):
arr.append(input())
dic = Counter(arr)
inverse = [(value, key) for key, value in dic.items()]
max_s = max(inverse)[0]
for key,value in dic.items():
if value == max_s:
arr_max.append(key)
else: continue
for j i... | [
"call.add",
"call.arguments.change"
] | 571,566 | 571,567 | u870684607 | python |
p02773 | from collections import defaultdict
from collections import OrderedDict
N = int(input())
ans = dict()
for _ in range(N):
k = str(input())
if k in ans:
ans[k]+=1
else:
ans.update({k:1})
eve = defaultdict(list)
for key, value in sorted(ans.items()):
eve[value].append(key)
l = eve[max(group... | from collections import defaultdict
from collections import OrderedDict
N = int(input())
ans = dict()
for _ in range(N):
k = str(input())
if k in ans:
ans[k]+=1
else:
ans.update({k:1})
groupedByValue = defaultdict(list)
for key, value in sorted(ans.items()):
groupedByValue[value].append(... | [
"assignment.variable.change",
"identifier.change",
"assignment.value.change"
] | 571,568 | 571,569 | u533328562 | python |
p02773 | from collections import defaultdict
from collections import OrderedDict
N = int(input())
answer = dict()
for _ in range(N):
k = str(input())
if k in ans:
ans[k]+=1
else:
ans.update({k:1})
groupedByValue = defaultdict(list)
for key, value in sorted(ans.items()):
groupedByValue[value].appe... | from collections import defaultdict
from collections import OrderedDict
N = int(input())
ans = dict()
for _ in range(N):
k = str(input())
if k in ans:
ans[k]+=1
else:
ans.update({k:1})
groupedByValue = defaultdict(list)
for key, value in sorted(ans.items()):
groupedByValue[value].append(... | [
"assignment.variable.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 571,570 | 571,569 | u533328562 | python |
p02773 | from collections import Counter
N=int(input())
l=['']*N
for i in range(N):
l[i]=input()
l.sort()
print(l)
c=1
c_crt=1
pre=""
ans=[]
for e in l+[""]:
if e == pre:
c_crt+=1
else:
if c_crt > c:
ans=[pre]
c=c_crt
elif c_crt == c:
ans.append(pre)
... | from collections import Counter
N=int(input())
l=['']*N
for i in range(N):
l[i]=input()
l.sort()
c=1
c_crt=1
pre=""
ans=[]
for e in l+[""]:
if e == pre:
c_crt+=1
else:
if c_crt > c:
ans=[pre]
c=c_crt
elif c_crt == c:
ans.append(pre)
c_c... | [
"call.remove"
] | 571,575 | 571,576 | u117541450 | python |
p02773 | n = int(input())
s = []
for i in range(n):
s.append(input())
print(s)
numbers = dict()
maxval = 1
for val in s:
if val in numbers:
if maxval == numbers[val]:
maxval = maxval + 1
numbers[val] += 1
else:
numbers[val] = 1
ret = [kv[0] for kv in numbers.items() if kv[1] == ... | n = int(input())
s = []
for i in range(n):
s.append(input())
numbers = dict()
maxval = 1
for val in s:
if val in numbers:
if maxval == numbers[val]:
maxval = maxval + 1
numbers[val] += 1
else:
numbers[val] = 1
ret = [kv[0] for kv in numbers.items() if kv[1] == maxval]
f... | [
"call.remove"
] | 571,580 | 571,581 | u258933429 | python |
p02773 | n = int(input())
s_dic = dict()
a_dic = dict()
for i in range(n):
s = input()
if s not in s_dic:
s_dic[s] = 1
else:
s_dic[s] += 1
# s_dic_sk = sorted(s_dic.items())
s_dic_s = sorted(s_dic.items(), key= lambda x:x[1], reverse=True)
# print(len(s_dic_s))
# print(s_dic_s)
m_count = max(s_dic_s)[1]
# pri... | n = int(input())
s_dic = dict()
a_dic = dict()
for i in range(n):
s = input()
if s not in s_dic:
s_dic[s] = 1
else:
s_dic[s] += 1
# s_dic_sk = sorted(s_dic.items())
s_dic_s = sorted(s_dic.items(), key= lambda x:x[1], reverse=True)
# print(len(s_dic_s))
#print(s_dic_s)
m_count = s_dic_s[0][1]
# print(... | [
"call.remove",
"assignment.value.change",
"call.arguments.change"
] | 571,590 | 571,591 | u684906944 | python |
p02773 | sz = int(input(''))
ary = []
for i in range(0,sz):
s = input()
ary.append(s)
map = {}
for w in ary:
if not w in map:
map[w] = 1
else:
map[w] +=1
max = 0
maxes = []
for k,v in map.items():
if v > max:
max = v
for k,v in map.items():
if v == max:
maxes.append(k)
for m in maxes.sort():
pr... | sz = int(input(''))
ary = []
for i in range(0,sz):
s = input()
ary.append(s)
map = {}
for w in ary:
if not w in map:
map[w] = 1
else:
map[w] +=1
max = 0
maxes = []
for k,v in map.items():
if v > max:
max = v
for k,v in map.items():
if v == max:
maxes.append(k)
for m in sorted(maxes):
p... | [
"call.arguments.change"
] | 571,596 | 571,597 | u194228880 | python |
p02773 | sz = int(input(''))
ary = []
for i in range(0,sz):
s = input()
ary.append(s)
map = {}
for w in ary:
if not w in map:
map[w] = 1
else:
map[w] +=1
max = 0
maxes = []
for k,v in map.items():
if v > max:
max = v
for k,v in map.items():
if v == max:
maxes.append(k)
for m in maxes:
print(m) | sz = int(input(''))
ary = []
for i in range(0,sz):
s = input()
ary.append(s)
map = {}
for w in ary:
if not w in map:
map[w] = 1
else:
map[w] +=1
max = 0
maxes = []
for k,v in map.items():
if v > max:
max = v
for k,v in map.items():
if v == max:
maxes.append(k)
for m in sorted(maxes):
p... | [
"call.add",
"call.arguments.change"
] | 571,598 | 571,597 | u194228880 | python |
p02773 | import sys
from collections import Counter
N=int(input())
S=['']*N
for i in range(N):
S[i]=input()
counter = Counter(S)
ans=[0]*len(counter)
num=0
for word, cnt in counter.most_common():
ans[num]=cnt
num+=1
anker=ans[0]
ankernum=0
for j in range(len(counter)):
if ans[j]!=anker:
ankernum=j
... | import sys
from collections import Counter
N=int(input())
S=['']*N
for i in range(N):
S[i]=input()
counter = Counter(S)
ans=[0]*len(counter)
num=0
for word, cnt in counter.most_common():
ans[num]=cnt
num+=1
anker=ans[0]
ankernum=0
for j in range(len(counter)):
if ans[j]!=anker:
ankernum=j
... | [
"call.remove"
] | 571,599 | 571,600 | u766393261 | python |
p02773 | import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
common = c.most_common()
max_number = common[0][1]
max_common = []
for k in range(a):
if common[k][1] == max_number:
max_common.append(common[k][0])
else:
break
for k in sorted(max_common):
print(k) | import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
common = c.most_common()
max_number = common[0][1]
a = len(common)
max_common = []
for k in range(a):
if common[k][1] == max_number:
max_common.append(common[k][0])
else:
break
for k in sorted(max_common):
... | [
"assignment.add"
] | 571,602 | 571,603 | u614628638 | python |
p02773 | import collections
n = int(input())
s = [input() for i in range(n)]
counted = collections.Counter(s)
m = max(counted.values())
chars = [key for key, value in counted.items()
if value == m]
chars.reverse()
moji = '\n'.join(chars)
print(moji) | import collections
n = int(input())
s = [input() for i in range(n)]
counted = collections.Counter(s)
m = max(counted.values())
chars = [key for key, value in counted.items()
if value == m]
chars.sort()
moji = '\n'.join(chars)
print(moji) | [
"identifier.change"
] | 571,604 | 571,605 | u921950806 | python |
p02773 | N = int(input())
l = []
for _ in range(N):
l.append(input())
from collections import Counter
co = Counter(l).most_common()
l = [co[0][0]]
for n in range(N):
if co[n+1][1] == co[n][1]:
l.append(co[n+1][0])
else:
break
l.sort()
for n in range(len(l)):
print(l[n]) | N = int(input())
l = []
for _ in range(N):
l.append(input())
from collections import Counter
co = Counter(l).most_common()
l = [co[0][0]]
for n in range(len(co)-1):
if co[n+1][1] == co[n][1]:
l.append(co[n+1][0])
else:
break
l.sort()
for n in range(len(l)):
print(l[n]) | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 571,612 | 571,613 | u697968316 | python |
p02773 | from collections import OrderedDict
N = int(input())
ans = dict()
for _ in range(N):
k = str(input())
if k in ans:
ans[k]+=1
else:
ans.update({k:1})
groupedByValue = defaultdict(list)
for key, value in sorted(ans.items()):
groupedByValue[value].append(key)
l = groupedByValue[max(groupedB... | from collections import defaultdict
from collections import OrderedDict
N = int(input())
ans = dict()
for _ in range(N):
k = str(input())
if k in ans:
ans[k]+=1
else:
ans.update({k:1})
groupedByValue = defaultdict(list)
for key, value in sorted(ans.items()):
groupedByValue[value].append(... | [] | 571,614 | 571,615 | u166807268 | python |
p02773 | import collections
n=int(input())
s = []
sort=[]
for i in range(n):
s.append(input())
ans=collections.Counter(s).most_common()
oldnum=ans[0][1]
for i in range(n):
if oldnum == ans[i][1]:
sort.append(ans[i][0])
oldnum=ans[i][1]
else:
break
sort.sort()
for i in range(len(sort)):
pr... | import collections
n=int(input())
s = []
sort=[]
for i in range(n):
s.append(input())
ans=collections.Counter(s).most_common()
oldnum=ans[0][1]
for i in range(len(ans)):
if oldnum == ans[i][1]:
sort.append(ans[i][0])
oldnum=ans[i][1]
else:
break
sort.sort()
for i in range(len(sort)):... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 571,618 | 571,619 | u728303437 | python |
p02773 | N = int(input())
S = [input() for _ in range(N)]
S.sort()
h = {}
name = set(S)
for n in name:
h[n] = 0
for s in S:
h[s] += 1
max_h = h[max(h)]
l = []
for s in set(S):
if h[s] == max_h:
l.append(s)
for i in sorted(l):
print(i)
| N = int(input())
S = [input() for _ in range(N)]
S.sort()
h = {}
name = set(S)
for n in name:
h[n] = 0
for s in S:
h[s] += 1
max_h = max(h.values())
l = []
for s in set(S):
if h[s] == max_h:
l.append(s)
for i in sorted(l):
print(i) | [
"call.add"
] | 571,620 | 571,621 | u224353074 | python |
p02773 | N = int(input())
S = [input() for i in range(N)]
S.sort()
maxi = 0
tmp = 0
ans = []
for i in range(N-1):
if S[i] == S[i+1]:
tmp += 1
else:
if tmp > maxi:
maxi = tmp
ans.clear()
ans.append(S[i])
elif tmp == maxi:
ans.append(S[i])
tmp = 0
if i == N-2:
if S[i] == S[i+1]:... | N = int(input())
S = [input() for i in range(N)]
S.sort()
maxi = 0
tmp = 1
ans = []
for i in range(N-1):
if S[i] == S[i+1]:
tmp += 1
else:
if tmp > maxi:
maxi = tmp
ans.clear()
ans.append(S[i])
elif tmp == maxi:
ans.append(S[i])
tmp = 1
if i == N-2:
if S[i] == S[i+1]:... | [
"literal.number.integer.change",
"assignment.value.change"
] | 571,624 | 571,625 | u944643608 | python |
p02773 | N = int(input())
name = [input() for i in range(N)]
import collections
'''
name = ""
dic = {}
for i in range(N):
name = input()
dic[name] += 1
print(dic)
'''
c = collections.Counter(name)
values, counts = zip(*c.most_common(N))
maxim = counts[0]
answer = []
for val, cnt in zip(values,counts):
if ( cnt == maxim):
... | N = int(input())
name = [input() for i in range(N)]
import collections
'''
name = ""
dic = {}
for i in range(N):
name = input()
dic[name] += 1
print(dic)
'''
c = collections.Counter(name)
values, counts = zip(*c.most_common(N))
maxim = counts[0]
answer = []
for val, cnt in zip(values,counts):
if ( cnt == maxim):
... | [
"assignment.add"
] | 571,631 | 571,632 | u078816252 | python |
p02773 | import collections
n=int(input())
s = []
max = 0
for i in range(n):
s.append(input())
c = collections.Counter(s)
for i in c.items():
if i[1] > max:
max = i[1]
s2 = [i[0] for i in c.items() if i[1] == max]
for j in range(len(s2)):
print(s2[j]) | import collections
n=int(input())
s = []
max = 0
for i in range(n):
s.append(input())
c = collections.Counter(s)
for i in c.items():
if i[1] > max:
max = i[1]
s2 = [i[0] for i in c.items() if i[1] == max]
s2.sort()
for j in range(len(s2)):
print(s2[j])
| [
"call.add"
] | 571,635 | 571,636 | u630554891 | python |
p02773 | n=int(input())
string_list=[input() for i in range(n)]
import collections
import numpy as np
c = collections.Counter(string_list)
d=c.most_common()
x=int(d[0][1])
z=[]
for i in range(len(d)):
y=int(d[i][1])
if x==y:
z.append(str(d[i][0]))
z.sort(reverse=True)
for i in range(len(z)):
print(z[i]) | n=int(input())
string_list=[input() for i in range(n)]
import collections
import numpy as np
c = collections.Counter(string_list)
d=c.most_common()
x=int(d[0][1])
z=[]
for i in range(len(d)):
y=int(d[i][1])
if x==y:
z.append(str(d[i][0]))
z.sort()
for i in range(len(z)):
print(z[i]) | [] | 571,639 | 571,640 | u686989171 | python |
p02773 | from collections import defaultdict
from collections import OrderedDict
n = int(input())
answer = dict()
for _ in range(n):
z = str(input())
if z in answer:
ans[z]+=1
else:
answer.update({z:1})
groupedByValue = defaultdict(list)
for key, value in sorted(answer.items()):
groupedByValue[va... | from collections import defaultdict
from collections import OrderedDict
n = int(input())
answer = dict()
for _ in range(n):
z = str(input())
if z in answer:
answer[z]+=1
else:
answer.update({z:1})
groupedByValue = defaultdict(list)
for key, value in sorted(answer.items()):
groupedByValue... | [
"identifier.change"
] | 571,643 | 571,644 | u958207414 | python |
p02773 | from collections import defaultdict
from collections import OrderedDict
n = int(input())
ans = dict()
for _ in range(n):
z = str(input())
if z in answer:
ans[z]+=1
else:
answer.update({z:1})
groupedByValue = defaultdict(list)
for key, value in sorted(answer.items()):
groupedByValue[value... | from collections import defaultdict
from collections import OrderedDict
n = int(input())
answer = dict()
for _ in range(n):
z = str(input())
if z in answer:
answer[z]+=1
else:
answer.update({z:1})
groupedByValue = defaultdict(list)
for key, value in sorted(answer.items()):
groupedByValue... | [
"assignment.variable.change",
"identifier.change"
] | 571,645 | 571,644 | u958207414 | python |
p02773 | N = int(input())
S = [input() for _ in range(N)]
hash = {}
for i in range(N):
if S[i] in hash:
hash[S[i]] += 1
else:
hash[S[i]] = 1
max_value = max(hash.values())
result = {}
for i in hash.keys():
if hash[i] == max_value:
result[hash[i]] = True
for key in sorted(result.keys()):
... | N = int(input())
S = [input() for _ in range(N)]
hash = {}
for i in range(N):
if S[i] in hash:
hash[S[i]] += 1
else:
hash[S[i]] = 1
max_value = max(hash.values())
result = {}
for key in hash.keys():
if hash[key] == max_value:
result[key] = True
for key in sorted(result.keys()):
... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"assignment.variable.change"
] | 571,648 | 571,649 | u205936263 | python |
p02773 | n = int(input())
dic = {}
for _ in range(n):
s = input()
if dic.get(s) == None:
dic[s] = 1
else:
dic[s] += 1
m = max(dic.items())
l = []
for v in dic.items():
if v[1] == m[1]:
l.append(v[0])
sortl = sorted(l)
for i in range(len(sortl)):
print(sortl[i]) | n = int(input())
dic = {}
for _ in range(n):
s = input()
if dic.get(s) == None:
dic[s] = 1
else:
dic[s] += 1
m = max(dic.values())
l = []
for v in dic.items():
if v[1] == m:
l.append(v[0])
sortl = sorted(l)
for i in range(len(sortl)):
print(sortl[i]) | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.for.condition.change"
] | 571,653 | 571,654 | u546338822 | python |
p02773 | import collections
n = int(input())
words = [input() for _ in range(n)]
c = collections.Counter(words)
max_c = c.most_common()
ans = [max_c[0][0]]
for i in range(1, len(max_c)):
if max_c[i][1] == max_c[i-1][1]:
ans.append(max_c[i][0])
else:
break
ans_sorted = sorted(ans, reverse=True)
for i i... | import collections
n = int(input())
words = [input() for _ in range(n)]
c = collections.Counter(words)
max_c = c.most_common()
ans = [max_c[0][0]]
for i in range(1, len(max_c)):
if max_c[i][1] == max_c[i-1][1]:
ans.append(max_c[i][0])
else:
break
ans_sorted = sorted(ans)
for i in range(len(an... | [
"call.arguments.change"
] | 571,658 | 571,659 | u759518460 | python |
p02773 | # ABC155c
def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
# 再帰関数を使わない限りPypyで出すこと
n = int(input())
s = [input()[:-1] for _ in range(n)]
from collections import Counter
ma = 0
ans = []
for st, cou in Counter(s).most_common():
ma = max(ma, c... | # ABC155c
def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
# 再帰関数を使わない限りPypyで出すこと
n = int(input())
s = [input()[:-1] for _ in range(n)]
from collections import Counter
ma = 0
ans = []
for st, cou in Counter(s).most_common():
ma = max(ma, c... | [
"control_flow.exit.remove",
"control_flow.break.add",
"call.arguments.change"
] | 571,672 | 571,673 | u278356323 | python |
p02773 | import collections
N=int(input())
S=[0 for i in range(N)]
for i in range(N):
S[i]=str(input())
c = collections.Counter(S)
p=max(c.values())
T=[]
for i in S:
if c[i]==p:
T.append(i)
T=sorted(T)
for i in range(len(T)):
print(T[i]) | import collections
N=int(input())
S=[0 for i in range(N)]
for i in range(N):
S[i]=str(input())
c = collections.Counter(S)
p=max(c.values())
T=[]
for i in c:
if c[i]==p:
T.append(i)
T=sorted(T)
for i in range(len(T)):
print(T[i]) | [
"identifier.change"
] | 571,674 | 571,675 | u813569174 | python |
p02773 | import numpy as np
n = int(input())
s_list = [input() for i in range(n)]
new_dict = {}
for s in s_list:
if s not in new_dict.keys():
new_dict[s] = 1
else:
new_dict[s] += 1
values = []
keys = []
for key in new_dict.keys():
values.append(new_dict[key])
keys.append(key)
valu... | import numpy as np
n = int(input())
s_list = [input() for i in range(n)]
new_dict = {}
for s in s_list:
if s not in new_dict.keys():
new_dict[s] = 1
else:
new_dict[s] += 1
values = []
keys = []
for key in new_dict.keys():
values.append(new_dict[key])
keys.append(key)
valu... | [
"assignment.add"
] | 571,683 | 571,684 | u608053762 | python |
p02773 | from collections import Counter
import numpy as np
N = int(input())
S = [input() for _ in range(N)]
c = Counter(S)
candidate = np.array(list(c.keys()))[np.array(list(c.values())) == max(c.values())]
for i in range(len(candidate)):
print(candidate[i]) | from collections import Counter
import numpy as np
N = int(input())
S = [input() for _ in range(N)]
c = Counter(S)
candidate = sorted(np.array(list(c.keys()))[np.array(list(c.values())) == max(c.values())])
for i in range(len(candidate)):
print(candidate[i]) | [
"call.add",
"call.arguments.change"
] | 571,689 | 571,690 | u873616440 | python |
p02773 | N = int(input())
dicta = {}
for i in range(N):
word = input()
dicta.setdefault(word, 0)
dicta[word] += 1
word_c = list(dicta.items())
word_c.sort(key=lambda tup: tup[1], reverse=True)
max_len_word = [word_c[0][0]]
for j in range(1,N):
if word_c[j][1] == word_c[0][1]:
max_len_word.append(word_c[j... | N = int(input())
dicta = {}
for i in range(N):
word = input()
dicta.setdefault(word, 0)
dicta[word] += 1
word_c = list(dicta.items())
word_c.sort(key=lambda tup: tup[1], reverse=True)
max_len_word = [word_c[0][0]]
for j in range(1,len(word_c)):
if word_c[j][1] == word_c[0][1]:
max_len_word.appen... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 571,691 | 571,692 | u574211979 | python |
p02773 | n = int(input())
s_list = [input() for _ in range(n)]
most_list = []
counter_dict = {}
for s in s_list:
if s in counter_dict:
counter_dict[s] += 1
else:
counter_dict[s] = 1
sorted_counter = sorted(counter_dict.items(), key=lambda x: x[1], reverse=True)
ans = []
max_num = sorted_counter[0][1]
fo... | n = int(input())
s_list = [input() for _ in range(n)]
most_list = []
counter_dict = {}
for s in s_list:
if s in counter_dict:
counter_dict[s] += 1
else:
counter_dict[s] = 1
sorted_counter = sorted(counter_dict.items(), key=lambda x: x[1], reverse=True)
ans = []
max_num = sorted_counter[0][1]
fo... | [
"call.add"
] | 571,693 | 571,694 | u319345083 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.