ZhenlongDai/ACPR huggingface dataset:
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
list = []
for i in range(n):
  i = str(input())
  ilen = len(i)
  list.append(ilen)
  
kind = len(list)
print(kind)

Failing test case input:
5
grape
grape
graoe
grape
eparg

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
lis = set()
for i in range(n):
  i = str(input())
  lis.add(i)
  
kind = int(len(lis))
print(kind)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = [input() for i in range(N)]
i = 0
cnt = 0
kind = 0
while(cnt < N):
    cnt += S.count(S[i])
    kind += 1
    i += 1
print(kind)

Failing test case input:
5
grape
grape
graoe
grape
eparg

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
S = sorted(list(input() for i in range(N)))
cnt = 0
for i in range(1, N):
    if(S[i-1] != S[i]):
        cnt += 1
print(cnt + 1)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
newlst = []
lst =[]
m = int(input())
while(m<0):
    a = str(input())
    lst.append(a)
    m = m -1
for j in lst:
    if j not in newlst:
        newlst.append(j)
print(len(newlst))


Failing test case input:
3
flooa
mgbrmf
palcp

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
newlst = []
lst =[]
m = int(input())
while m > 0:
    a = str(input())
    lst.append(a)
    m = m -1
newlst = list(dict.fromkeys(lst))
print(len(newlst))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections

N=int(input())
P=[input() for i in range(N)]
print(P)
c=collections.Counter(P)
print(len(c))

Failing test case input:
5
eaepr
eqago
e`qog
gr`pe
rgaqf

Expected output:
5


Actual output:
['eaepr', 'eqago', 'e`qog', 'gr`pe', 'rgaqf']
5


Fixed submission (verdict: Accepted):
import collections

N=int(input())
P=[input() for i in range(N)]
c=collections.Counter(P)
print(len(c))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
a_list=[]
for i in range(N):
  a_list.append(input())
  
set(a_list)

a_num = len(a_list)

print(a_num)

Failing test case input:
3
apple
orange
apple

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
a_list=[]
for i in range(N):
  a_list.append(input())
  
a_set = set(a_list)

a_num = len(a_set)

print(a_num)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
string_list=[input() for i in range(n)]

print(len(string_list))

Failing test case input:
5
geapr
grape
graoe
grape
epaqg

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
string_list=[input() for i in range(n)]

print(len(set(string_list)))

Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
l=[]
for i in range(n):
  s=str(input())
  if s not in l:
    l.append(s)

Failing test case input:
5
egapr
grape
graoe
grape
epaqg

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
n=int(input())
l=[]
for i in range(n):
  s=str(input())
  l.append(s)
print(len(set(l)))
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

d = {}

for _ in range(N):
  s = input()
  if s not in d:
    print(s)
    d[s] = 1
  


Failing test case input:
3
flppa
fgnaro
appld

Expected output:
3


Actual output:
flppa
fgnaro
appld


Fixed submission (verdict: Accepted):
N = int(input())

items = [input() for _ in range(N)]

d = {}
for item in items:
    d[item] = True
    
print(len(d))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():

    N = int(input())

    S = []
    for i in range(N):
        S.append(input())
    
    sorted_S = sorted(S)

    now_name = sorted_S[0]
    ans = 1
    for i in range(N):
        if now_name != sorted_S[i]:
            ans += 1
    
    print('{}'.format(ans))



if __name__ == '__main__':
    main()

Failing test case input:
5
geapr
grape
graoe
grape
epaqg

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
def main():

    N = int(input())

    S = []
    for i in range(N):
        S.append(input())
    
    S.sort()

    now_name = S[0]
    ans = 1
    for i in range(N):
        if now_name != S[i]:
            ans += 1
            now_name = S[i]
    
    print('{}'.format(ans))



if __name__ == '__main__':
    main()

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
S=[]
for i in range(N):
    S.append(i)
Set=set(S)
print(len(Set))

Failing test case input:
5
egapr
grape
graoe
grape
epaqg

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
N=int(input())
S=[]
for i in range(N):
    _=input()
    S.append(_)
Set=set(S)
print(len(Set))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = [input() for i in range(N)]
print(len(S))

Failing test case input:
3
apple
orange
apple

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
S = set([input() for i in range(N)])
print(len(S))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = []
s_append = s.append
for i in range(n):
    s_append(i)

print(len(set(s)))


Failing test case input:
5
grape
grape
graoe
grape
epaqg

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
s = []
s_append = s.append
for i in range(n):
    s_append(input())

print(len(set(s)))

Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
S = ["" for _ in range(N)]
num = 1
for i in range(N):
  S[i] = input()
List = sorted(S)
for j in range(N-1):
  if S[j] != S[j+1]:
    num += 1
print(num)

Failing test case input:
5
grape
grape
graoe
grape
grape

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
S = ["" for _ in range(N)]
num = 1
for i in range(N):
  S[i] = input()
List = sorted(S)
for j in range(N-1):
  if List[j] != List[j+1]:
    num += 1
print(num)
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input()) 
s = [input() for i in range(N)] 
print(s) 
print(len(set(s)))

Failing test case input:
3
flppa
fgnaro
appld

Expected output:
3


Actual output:
['flppa', 'fgnaro', 'appld']
3


Fixed submission (verdict: Accepted):
N = int(input()) 
s = [input() for i in range(N)] 
print(len(set(s)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num=int(input())
lst=[]
if 1<=num<=2*10**5:
    lst=[input() for i in range(num)]
    print(lst)
    print(len(set(lst)))

Failing test case input:
4
`caa
a
aab
aa

Expected output:
4


Actual output:
['`caa', 'a', 'aab', 'aa']
4


Fixed submission (verdict: Accepted):
num=int(input())
lst=[]
if 1<=num<=2*10**5:
    lst=[input() for i in range(num)]
    print(len(set(lst)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


n = int(input())
s = []
c = 0

for i in range(n):
    s.append(input())

s.sort()

for j in range(n-1):
    if s[j] != s[j+1]:
        c += 1


print(c)


Failing test case input:
3
apple
egnaro
appld

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):


n = int(input())
s = []
c = 1

for i in range(n):
    s.append(input())

s.sort()

for j in range(1,n):
    if s[j-1] != s[j]:
        c += 1


print(c)

Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
from collections import Counter

n = int(input())

items = []
for _ in range(n):
  items.append(input())
  
freq = Counter(items)
print(len(items))

Failing test case input:
5
grape
grape
graoe
grape
grape

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
from collections import Counter
 
n = int(input())
 
items = []
for _ in range(n):
  items.append(input())
  
freq = Counter(items)
print(len(freq))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = [input() for i in range(N)]




C = dict([s,1] for s in S)
L = len(C)

Failing test case input:
4
abc`
a
bc_
`a

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
S = [input() for i in range(N)]




C = dict([s,1] for s in S)
L = len(C)
print(L)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections

N=int(input())
list=[input() for i in range(N)]

c= collections.Counter(list)

m=0
for i in c.values():
    m+=i

print(m)

Failing test case input:
5
egapr
grape
graoe
grape
epaqg

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
import collections

N=int(input())
list=[input() for i in range(N)]

c= collections.Counter(list)

m=0
for i in c.values():
    m+=1

print(m)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys;


class Main:
    s = set([i for i in sys.stdin.readlines()]);

    print(len(s));



Failing test case input:
4
`cba
a
bc_
`a

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):



class Main:
    N = int(input());
    s = set([input() for i in range(N)]);
    print(len(s))
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections
a = input().strip().split()
number = a.pop(0)
clist = collections.Counter(a)
print(len(clist))

Failing test case input:
3
flppa
fgamrn
appld

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
import collections
num = int(input())
a = [input() for i in range(num)]
clist = collections.Counter(a)
print(len(clist))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = []
for _ in range(n):
    s.append(input())

print(s)

print(len(set(s)))

Failing test case input:
4
`cba
a
bb_
`a

Expected output:
4


Actual output:
['`cba', 'a', 'bb_', '`a']
4


Fixed submission (verdict: Accepted):
n = int(input())
s = []
for _ in range(n):
    s.append(input())

print(len(set(s)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
p = list((input().split()))
s = set()
for i in range(1, len(p)):
    s.add(p[i])
print(len(s))

Failing test case input:
3
applf
orangf
appld

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
p = [input() for i in range(n)]
s = set()
for i in range(n):
    s.add(p[i])
print(len(s))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = [input() for _ in range(n)]
ans = [[] for _ in range(n)]

for i in range(n):
  ans[i] = s[i]

print(len(ans))

Failing test case input:
5
grape
grape
grape
grape
grape

Expected output:
1

Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
s = [input() for _ in range(n)]
ans = [[] for _ in range(n)]

for i in range(n):
     ans[i] = s[i]

ANS = set(ans)
print(len(ANS))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
l=[]
for i in range(1,N):
  l.append(input())
  
print(len(set(l)))

Failing test case input:
5
grape
grape
graoe
grape
epaqg

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N=int(input())
l=[]
for i in range(N):
  l.append(input())

print(len(set(l)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections
N = int(input())
S = [str(input()) for i in range(N)]
a = collections.Counter(S)
print(len(S))


Failing test case input:
3
apple
orange
apple

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
import collections
N = int(input())
S = [str(input()) for i in range(N)]
a = collections.Counter(S)
print(len(a))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
s=list(set(input().split()))
print(len(s))

Failing test case input:
3
applf
fgnaro
appld

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
s=list(set([input() for _ in range(n)]))
print(len(s))
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
g=[]
for i in range(n):
  gi=input()
  g.append(gi)  
g.sort()
count=1
for i in range(n-1):
  if g[i]!=g[i+1]:
    count+=1
print(g)
print(count)

Failing test case input:
5
eaepr
eqago
e`qog
gr`pe
frbgr

Expected output:
5


Actual output:
['e`qog', 'eaepr', 'eqago', 'frbgr', 'gr`pe']
5


Fixed submission (verdict: Accepted):
n=int(input())
g=[]
for i in range(n):
  gi=input()
  g.append(gi)  
g.sort()
count=1
for i in range(n-1):
  if g[i]!=g[i+1]:
    count+=1

print(count)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from sys import stdin
data = stdin.readlines()

n = int(data[0].split()[0])

print(n)

l = []
for i in range(n):
    if not data[i+1].split()[0] in l:
        l.append(data[i+1].split()[0])
print(len(l))

Failing test case input:
3
applf
nramgf
appld

Expected output:
3


Actual output:
3
3


Fixed submission (verdict: Accepted):
from sys import stdin
data = stdin.readlines()

n = int(data[0].split()[0])

l = []
for i in range(n):
    l.append(data[i+1].split()[0])
print(len(set(l)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = [input(i) for i in range(N)]

ans=set(S)
print(len(ans))

Failing test case input:
4
acb`
a
_ba
ab

Expected output:
4


Actual output:
01234


Fixed submission (verdict: Accepted):
N = int(input())
S = [input() for _ in range(N)]

ans=set(S)
print(len(ans))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = set(S)
len(set_S)


Failing test case input:
4
`bca
a
ab_
bb

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = list(set(S))
print(len(set_S))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
S=[]
for i in range(N):
    _=input()
    S.append(i)
Set=set(S)
print(len(Set))

Failing test case input:
5
grape
grape
grape
grape
grape

Expected output:
1

Actual output:
5


Fixed submission (verdict: Accepted):
N=int(input())
S=[]
for i in range(N):
    _=input()
    S.append(_)
Set=set(S)
print(len(Set))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def gacha(sl):
    print(len(set(sl)))

n = int(input())
sl = []
for _ in range(n):
    sl.append(input())
print(sl)

gacha(sl)

Failing test case input:
3
bpple
egnaro
appld

Expected output:
3


Actual output:
['bpple', 'egnaro', 'appld']
3


Fixed submission (verdict: Accepted):
def gacha(sl):
    print(len(set(sl)))

n = int(input())
sl = []
for _ in range(n):
    sl.append(input())


gacha(sl)
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = [input() for i in range(n)]

ss = sorted(s)
test = ss[0]
count = 1

for i in range(n):
  if test != s[i]:
    test = s[i]
    count += 1
    
print(count)

Failing test case input:
3
applf
nrangf
appld

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
s = [input() for i in range(n)]

ss = sorted(s)
test = ss[0]
count = 1

for i in range(n):
  if test != ss[i]:
    test = ss[i]
    count += 1
    
print(count)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
l = []
for _ in range(N):
    l.append(input())

print(len(l))

Failing test case input:
5
grape
grape
graoe
grape
grape

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
l = []
for _ in range(N):
    l.append(input())

print(len(set(l)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
A=set(map(str,input().split()))
print(len(A))

Failing test case input:
4
`cba
b
b`a
bb

Expected output:
4


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
A=set(input() for i in range(N))
print(len(A))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
lis = set()
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.add(ilen)
  
kind = int(len(lis))
print(kind)


Failing test case input:
5
eaepr
eqago
e`qog
gr`pe
rgarf

Expected output:
5


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
lis = set()
for i in range(n):
  i = str(input())
  lis.add(i)
  
kind = int(len(lis))
print(kind)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = list(map(str,input().split()))

T = list(set(S))
print(len(T))

Failing test case input:
3
flooa
fgaqmm
pplda

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
S = [input() for i in range(N)]
T = list(set(S))
print(len(T))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import defaultdict

def solve():
    N = int(input())
    A = [input() for _ in range(N)]
    d = defaultdict(int)
    
    for a in A:
        d[a] += 1
    
    return len(d)




solve()

Failing test case input:
3
applf
fgmarn
appld

Expected output:
3


Actual output:

Fixed submission (verdict: Accepted):
from collections import defaultdict

def solve():
    N = int(input())
    A = [input() for _ in range(N)]
    d = defaultdict(int)
    
    for a in A:
        d[a] += 1
    
    return len(d)

print(solve())

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
List = [input() for i in range(n)]
set(List)
print(len(List))

Failing test case input:
5
grape
grape
grape
grape
grape

Expected output:
1

Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
List = [input() for i in range(n)]
d=set(List)
print(len(d))
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = []
for n in range(N):
    Sn = str(input())
    S.append(Sn)
print(S)
ans = len(list(dict.fromkeys(S)))
print(ans)

Failing test case input:
5
eaepr
eqago
goq`e
gr`pe
frbgr

Expected output:
5


Actual output:
['eaepr', 'eqago', 'goq`e', 'gr`pe', 'frbgr']
5


Fixed submission (verdict: Accepted):
N = int(input())
S = []
for n in range(N):
    Sn = str(input())
    S.append(Sn)
ans = len(list(dict.fromkeys(S)))
print(ans)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = [input() for i in range(n)]

count = 1
for i in range(1,n):
    if not l[i] in l[:i - 1]:
        count += 1
        
print(count)

Failing test case input:
5
grape
grape
graoe
grape
eparg

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
a = [input() for i in range(n)]

l = sorted(a)

count = 1
for i in range(n - 1):
    if l[i] != l[i + 1]:
        count += 1
    
print(count)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
l=[]
for i in range(n):
    l.append(len(input()))
    
print(len(set(l)))

Failing test case input:
5
eagpr
grape
gqaoe
ep`rg
epaqg

Expected output:
5


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
l=[]
for i in range(n):
    l.append(input())
    
print(len(set(l)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = set()
for i in range(N):
  S.add(i)
print(len(S))

Failing test case input:
3
apple
orange
apple

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
S = set()
for i in range(N):
  S.add(input())
print(len(S))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = []
cnt = 0
for i in range(n):
    s = input()
    ans.append(s)
ans.sort()
for i in range(n-1):
    if ans[i]!=ans[i+1]:
        cnt+=1
print(cnt)

Failing test case input:
4
abc`
a
bc_
`a

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
ans = []
cnt = 1
for i in range(n):
    s = input()
    ans.append(s)
ans.sort()
for i in range(n-1):
    if ans[i]!=ans[i+1]:
        cnt+=1
print(cnt)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
slist = []
for i in range(n):
    news = str(input())
    slist.append(news)

slist_u = list(set(slist))
print(slist_u)
slist_u_len = len(slist_u)
print(slist_u_len)

Failing test case input:
3
bpple
egnaro
appld

Expected output:
3


Actual output:
['bpple', 'egnaro', 'appld']
3


Fixed submission (verdict: Accepted):
n = int(input())
slist = []
for i in range(n):
    news = str(input())
    slist.append(news)

slist_u = list(set(slist))

slist_u_len = len(slist_u)
print(slist_u_len)
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


N = int(input())
S = set()
for i in range(N):
    S.add(input())
print(S)
print(len(S))

Failing test case input:
4
a`aa
a
aaa
aa

Expected output:
4


Actual output:
{'aa', 'a', 'a`aa', 'aaa'}
4


Fixed submission (verdict: Accepted):


N = int(input())
S = set()
for i in range(N):
    S.add(input())

print(len(S))

Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N=int(input())
len({input() for i in range(N)})

Failing test case input:
4
`cba
b
b`a
bb

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
N=int(input())
print(len({input() for i in range(N)}))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = int(input())
aaa = list([input(i)for i in range(a)])

ans = len(set(aaa))

print(ans)

Failing test case input:
3
flooa
fgaqmm
pplda

Expected output:
3


Actual output:
0123


Fixed submission (verdict: Accepted):
a = int(input())
aaa = set([input()for i in range(a)])

bbb = list(set(aaa))

ans = len(bbb)

print(ans)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math

def main():
    n = input()
    s = {}
    print(n)
    while int(n)>0:
        m = input()
        if m in s:
            s[m]+=1
        else:
            s[m]=1
        n = int(n) - 1
    print(len(s))
    return 0

main()

Failing test case input:
4
`cba
a
bb_
aa

Expected output:
4


Actual output:
4
4


Fixed submission (verdict: Accepted):
import math

def main():
    n = input()
    s = {}
    while int(n)>0:
        m = input()
        if m in s:
            s[m]+=1
        else:
            s[m]=1
        n = int(n) - 1
    print(len(s))
    return 0

main()

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
A=set(input().split())
print(A)



Failing test case input:
5
egapr
grape
graoe
gr`pe
epaqg

Expected output:
5


Actual output:
{'egapr'}


Fixed submission (verdict: Accepted):
N=int(input())
A=set(input() for i in range(N))
print(len(A))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num=int(input())
count=0
temp=""
while(num):
    something = input()
    if(temp!=something):
        count+=1
        temp=something
    num-=1
print(count)

Failing test case input:
3
apple
orange
apple

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
num=int(input())
something=[]
while(num):
    temp=input()
    something.append(temp)
    num-=1
something_set=set(something)
print(len(something_set))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

s = int(input())  
s_list = [input() for _ in range(s)]
print(s_list)   

ans = 0

s_list = set(s_list)

print(len(s_list))

Failing test case input:
4
`caa
a
aaa
aa

Expected output:
4


Actual output:
['`caa', 'a', 'aaa', 'aa']
4


Fixed submission (verdict: Accepted):

s = int(input())  
s_list = [input() for _ in range(s)]


ans = 0

s_list = set(s_list)

print(len(s_list))
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    
    
    N = int(input())

    
    
    
    
    
    
    

    val = 0
    str = ""
    for i in range(N):
        in_str = input()
        if str.find(in_str):
            str += " "+in_str
            val += 1

    print(val)

if __name__ == '__main__':
    main()


Failing test case input:
5
geapr
grape
graoe
grape
epaqg

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    
    
    N = int(input())

    
    
    
    
    
    
    

    S = set()
    for i in range(N):
        S.add(input())

    print(len(S))

    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    

if __name__ == '__main__':
    main()

Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N=int(input())
X=[]
for i in range(N):
  X.append(input())
print(set(X))


Failing test case input:
3
apolf
fganrm
aqlpd

Expected output:
3


Actual output:
{'apolf', 'aqlpd', 'fganrm'}


Fixed submission (verdict: Accepted):
N=int(input())
X=[]
for i in range(N):
  X.append(input())
print(len(set(X)))

Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x=set()
c=0
n=int(input())
for i in range(0,n):
  s=input()
  if s in x:
    pass
  else:
    x.add(s)
    c+=1
    
    

Failing test case input:
4
aaaa
a
aaa
aa

Expected output:
4

Actual output:

Fixed submission (verdict: Accepted):
x=set()
c=0
n=int(input())
for i in range(0,n):
  s=input()
  if s in x:
    pass
  else:
    x.add(s)
    c+=1
print(c)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
items = []

for i in range(N):
    item = input()
    items.append(item)    
items.sort()
cnt = 0
before = ""
for index,item in enumerate(items):
    if index == 0:
        cnt += 1
        before = item
    elif before != item:
        cnt += 1
print(cnt)

Failing test case input:
5
grape
grape
graoe
grape
grape

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
items = []

for i in range(N):
    item = input()
    items.append(item)    
items.sort()
cnt = 0
before = ""
for index,item in enumerate(items):
    if index == 0:
        cnt += 1    
    elif before != item:
        cnt += 1
    before = item
print(cnt)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

from collections import Counter
a = int(input())

list = [input() for i in range(a)]

print(list)
print(len(Counter(list)))

Failing test case input:
3
bpple
egnaro
apple

Expected output:
3


Actual output:
['bpple', 'egnaro', 'apple']
3


Fixed submission (verdict: Accepted):

from collections import Counter
a = int(input())

list = [input() for i in range(a)]

print(len(Counter(list)))
Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def prb2():
    a,b,c,d = map(int,input().split())
    t = (a+b)
    ak = (c+d)
    print('Yes' if t>ak else "No")

def prb3():
    n = int(input())
    d = dict()
    for i in range(n):
        s = input()
        if s not in d:
            d[s] = 1
        else:
            d[s] += 1
    print(max(d.values()))





prb3()

Failing test case input:
4
acb`
a
_ba
aa

Expected output:
4


Actual output:
1


Fixed submission (verdict: Accepted):
def prb2():
    a,b,c,d = map(int,input().split())
    t = (a+b)
    ak = (c+d)
    print('Yes' if t>ak else "No")

def prb3():
    n = int(input())
    d = set()
    for i in range(n):
        s = input()
        d.add(s)
    print(len(d))





prb3()

Problem: p02701
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
L = set({})
count = 0
for i in range(N):
    L.add(input())
    count += 1
print(count)
    

    

Failing test case input:
5
egapr
grape
graoe
grape
epaqg

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
L = set({})
for i in range(N):
    L.add(input())
print(len(L))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
a = list()
p = list()
for _ in range(N):
    a.append(input())
for x in range(N):
    p.append(a.count(a[x]))
print(max(p))

Failing test case input:
3
flooa
fgaqnm
dplpa

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
a = list()
p = list()
for x in range(N):
    a.append(input())
p=set(a)
print(len(p))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = []
for i in range(N):
    S.append(input())
print(set(S))

Failing test case input:
5
egapr
grape
graoe
ep`rg
epaqf

Expected output:
5


Actual output:
{'egapr', 'grape', 'graoe', 'ep`rg', 'epaqf'}


Fixed submission (verdict: Accepted):
N = int(input())
S = []
for i in range(N):
    S.append(input())
print(len(set(S)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = set()
for _ in range(int(input())):
    s.add(input())
print(*s,'\n',len(s))

Failing test case input:
5
eaepr
eqago
e`qog
gr`pe
rgaqf

Expected output:
5


Actual output:
e`qog gr`pe eaepr eqago rgaqf 
 5


Fixed submission (verdict: Accepted):
s = set()
for _ in range(int(input())):
    s.add(input())
print(len(s))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
s = input().split()
print(len(set(s)))

Failing test case input:
4
`cba
a
bc_
`a

Expected output:
4


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
s = [input() for i in range(N)]
print(len(set(s)))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num=int(input())
list=[]
for i in range(num):
  a=input()
  list.append(a)
b=set(a)
print(len(b))

Failing test case input:
3
applf
nrangf
appld

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
num=int(input())
list=[]
for i in range(num):
  a=input()
  list.append(a)
b=set(list)
print(len(b))
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = list(set(S))
len(set_S)


Failing test case input:
3
flopa
fganrm
aqpld

Expected output:
3


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = list(set(S))
print(len(set_S))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = [input() for i in range(N)]

def histogram_sorted(data):
    table = []
    prev = data[0] 
    c = 1
    for i in range(1,len(data)):
        if prev == data[i]:
            c=c+1
        else:
            table.append([prev,c])
            prev = data[i]
            c = 1
    table.append([prev,c])
    return table

T = []
for i in range(N):
    T.append(S[i])
    
print(len(histogram_sorted(T)))

Failing test case input:
3
apple
orange
apple

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
S = [input() for i in range(N)]

def histogram_sorted(data):
    table = []
    prev = data[0]
    c = 1 
    for i in range(1,len(data)):
        if prev == data[i]:
            c=c+1
        else:
            table.append([prev,c])
            prev = data[i]
            c = 1
    table.append([prev,c]) 
    return table

T = []
for i in range(N):
    T.append(S[i])
    
    
print(len(histogram_sorted(sorted(T))))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
r=0
l=[]
for i in range(n):
  l.append(input())
l.sort()
for i in range(n-1):
  if l[i]!=l[i+1]:
    r+=1
  
print(r)


Failing test case input:
3
bpple
orange
apple

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n=int(input())
r=1
l=[]
for i in range(n):
  l.append(input())
l.sort()
for i in range(n-1):
  if l[i]!=l[i+1]:
    r+=1
  
print(r)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
S=[input() for i in range (N)]
L=list(S)
sorted(L)
print(len(L)+1)

Failing test case input:
5
rpgae
grape
gaqoe
ep`rg
qgaqe

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
N=int(input())
S=[input() for i in range (N)]
L=list(S)
M=list(set(L))
j=len(M)
print(j)

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
dic = {}
cnt =0
for i in  range(n):
    get = input()

    if get not in dic:
        dic[get] = 1

print(len(dic))
print(dic)

Failing test case input:
5
eagpr
grape
gqaoe
ep`rg
gqape

Expected output:
5


Actual output:
5
{'eagpr': 1, 'grape': 1, 'gqaoe': 1, 'ep`rg': 1, 'gqape': 1}


Fixed submission (verdict: Accepted):
n = int(input())
dic = {}
cnt =0
for i in  range(n):
    get = input()

    if get not in dic:
        dic[get] = 1

print(len(dic))
Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys 
input = sys.stdin.readline
for tt in range(1):
	n = int(input())
	s = set()
	for i in range(n):
		if i==n-1:
			s.add(input().lower())
		else:
			s.add(input().lower()[:-1])
	print(len(s))
			

Failing test case input:
5
grape
grape
graoe
grape
grape

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
import sys 
try:
	sys.stdin = open('input.txt', 'r') 
	sys.stdout = open('output.txt', 'w')
except:
	pass

for tt in range(1):
	n = int(input())
	s = set()
	for i in range(n):
		s.add(input())
	print(len(s))

Problem: p02701
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    
    
    N = int(input())

    
    
    
    
    
    
    

    S = {}
    val=0
    for i in range(N):
        str = input()
        if S.get(str) == None:
            S[val]=str
            val+=1

    print(val)

    
    
    
    
    
    
    
    
    

if __name__ == '__main__':
    main()


Failing test case input:
3
apple
orange
apple

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    
    
    N = int(input())

    
    
    
    
    
    
    

    S = set()
    for i in range(N):
        S.add(input())

    print(len(S))

    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    

if __name__ == '__main__':
    main()
Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))

AB = sorted(A)
C = int(N/2)
for i in range(N):
    if AB[i] <= AB[C-1]:
        print(AB[C])
    else:
        print(AB[C-1])

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))

AB = sorted(A)
C = int(N
for i in range(N):
    if A[i] <= AB[C-1]:
        print(AB[C])
    else:
        print(AB[C-1])

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
X = list(map(int, input().split()))
original_X = X

X.sort()


B = X[int(N/2-1)]
B_te = X[int(N/2)]

for i in range(N):
    if B < X[i]:
        print(B)
    else:
        print(B_te)

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):
N = int(input())
X = list(map(int, input().split()))
original_X = X

X = sorted(X)

B = X[int(N/2-1)]
B_te = X[int(N/2)]

for i in range(N):
    if B < original_X[i]:
        print(B)
    else:
        print(B_te)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


numbers=int(input())
list_num=[int(i) for i in input().split()]
sorted_list=sorted(list_num)

median1=sorted_list[int(numbers/2)-1]
median2=sorted_list[int(numbers/2)]

print('median1:', median1)
print('median2:', median2)

for i in list_num:
    if sorted_list.index(i) <= numbers/2-1:
        print(median2)
    else:
        print(median1)


Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
median1: 3
median2: 4
4
3
3
4


Fixed submission (verdict: Accepted):
numbers=int(input())
list_num=[int(i) for i in input().split()]
sorted_list=sorted(list_num)

median1=sorted_list[int(numbers/2)-1]
median2=sorted_list[int(numbers/2)]

for i in list_num:
    if i <= median1:
        print(median2)
    else:
        print(median1)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import copy
n = int(input())
x = list(map(int, input().split()))
sort_x = sorted(copy.copy(x))

middle = int(n/2) - 1
next_middle = middle + 1

for i in range(n):
  if x[i] <= sort_x[middle]:
    print(sort_x[middle])
  elif x[i] >= next_middle:
    print(sort_x[next_middle])



Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
3
4
4
3


Fixed submission (verdict: Accepted):
import copy
n = int(input())
x = list(map(int, input().split()))
sort_x = sorted(copy.copy(x))

middle = int(n/2) - 1
next_middle = middle + 1

for i in range(n):
  if x[i] <= sort_x[middle]:
    print(sort_x[next_middle])
  elif x[i] >= sort_x[next_middle]:
    print(sort_x[middle])
Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input()) 
X_list = [int(e) for e in input().split()]






X_list.sort(reverse=False)

Bi_smaller = X_list[int(len(X_list)/2-1)]
Bi_bigger = X_list[int(len(X_list)/2)]

for i in range(int(N/2)):
    print(Bi_bigger)
    
for i in range(int(N/2),N):
    print(Bi_smaller)

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):

import copy
N = int(input()) 
X_list = [int(e) for e in input().split()]

sort_X_list = copy.copy(X_list)
sort_X_list.sort(reverse=False)
Bi_smaller = sort_X_list[int(len(X_list)/2-1)]
Bi_bigger = sort_X_list[int(len(X_list)/2)]

for i in range(N):
    if X_list[i]>=Bi_bigger:
        print(Bi_smaller)
    else:
        print(Bi_bigger)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def mid(n):
    return int((n + 1) / 2)

N = int(input())
X = list(map(int, input().split()))
save = X[:]
for i in range(N):
    X = save[:]
    del X[i]
    X.sort()
    print(X[mid(N - 1) - 1])
    print(X)


Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
[3, 4, 4]
3
[2, 3, 4]
3
[2, 3, 4]
4
[2, 4, 4]


Fixed submission (verdict: Accepted):
N = int(input())
X = list(map(int, input().split()))

save = X[:]

save.sort()

midL = save[int(N / 2 - 1)]
midR = save[int(N / 2)]

for i in X:
    if i <= midL:
        print(midR)
    else:
        print(midL)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
X=list(map(int,input().split()))
Y=X
Y.sort()

a=Y[int((N-1)/2)]
b=Y[int((N+1)/2)]

for i in range(N):
    if X[i]<a:
        print(b)
    elif X[i]>b:
        print(a)
    else:
        if a==b:
            print(a)
        elif X[i]==a:
            print(b)
        else:
            print(a)


Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):
N=int(input())
X=list(map(int,input().split()))
Y=[X[i] for i in range(N)]
Y.sort()

a=Y[int((N-1)/2)]
b=Y[int((N+1)/2)]

for i in range(N):
    if X[i]<a:
        print(b)
    elif X[i]>b:
        print(a)
    else:
        if X[i]==a:
            print(b)
        elif X[i]==b:
            print(a)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
X = list(map(int,input().split()))
medIndex = int((n-1)/2)
Z = sorted(X[:])
c1 = Z[int(n/2-1)]
c2 = Z[int(n/2)]
for i in range(n) :
  if (i <= int(n/2-1)) :
    print(c2)
  else :
    print(c1)


Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):
n = int(input())
X = list(map(int,input().split()))
medIndex = int((n-1)/2)
Z = sorted(X[:])
c1 = Z[int(n/2-1)]
c2 = Z[int(n/2)]
for i in range(n) :
  if (X[i] <= c1) :
    print(c2)
  else :
    print(c1)
Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import copy
N = int(input())
numList = list(map(int, input().split()))
numList.sort()

for i in range(0,N):
	numListCopy = copy.deepcopy(numList)
	numListCopy.pop(i)
	medIndex = int(len(numListCopy)/2)
	print(numListCopy[medIndex])

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):
import copy
N = int(input())
numList = list(map(int, input().split()))
numListCopy = copy.deepcopy(numList)
numList = sorted(numList)
medIndex = int((N)/2)
med1 = numList[medIndex-1]
med2 = numList[medIndex]


for i in range(0,N):
	if numListCopy[i] <= med1:
		print(med2)
	elif med2 <= numListCopy[i]:
		print(med1)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
arr = input().split()
arr.sort()

for i in range(N):
    if i < N/2:
        print(arr[int(N/2-1)])
    else:
        print(arr[int(N/2)])

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
3
3
4
4


Fixed submission (verdict: Accepted):
N = int(input())
arr = list(map(int, input().split()))
X = arr.copy()
arr.sort()

for i in range(N):
    if X[i] < arr[int(N/2)]:
        print(arr[int(N/2)])
    else:
        print(arr[int(N/2)-1])

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())

X = list(map(int, input().split(' ')))

target = int((N-1)/2)
first_m = int(N/2)
second_m = first_m - 1
X = sorted(X)
for i in range(N):
    if X[i] <= X[second_m]: print(X[first_m])
    else: print(X[second_m])

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):
N = int(input())
X = list(map(int, input().split(' ')))








first_m = int(N/2)
second_m = first_m - 1
X_ = sorted(X)
for i in range(N):
    if X[i] <= X_[second_m]: print(X_[first_m])
    else: print(X_[second_m])

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input()) 
X_list = [int(e) for e in input().split()]






X_list.sort(reverse=False)

Bi_smaller = X_list[int(len(X_list)/2-1)]
Bi_bigger = X_list[int(len(X_list)/2)]

for i in range(int(N/2)):
    
    
    
    print(Bi_bigger)
    
for i in range(int(N/2),N):
    
    
    
    print(Bi_smaller)

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):

import copy
N = int(input()) 
X_list = [int(e) for e in input().split()]

sort_X_list = copy.copy(X_list)
sort_X_list.sort(reverse=False)
Bi_smaller = sort_X_list[int(len(X_list)/2-1)]
Bi_bigger = sort_X_list[int(len(X_list)/2)]

for i in range(N):
    if X_list[i]>=Bi_bigger:
        print(Bi_smaller)
    else:
        print(Bi_bigger)
Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
X = list(map(int,input().split()))
h = int(n/2)
for i in range(1,n+1):
  if i <= h:
    print(X[h])
  else:
    print(X[h-1])



Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
4
4


Fixed submission (verdict: Accepted):
n = int(input())
X = list(map(int,input().split()))
h = int(n/2)
Xs = sorted(X)
m1 = Xs[h-1]
m2 = Xs[h]

for i in range(n):
  if X[i] <= m1:
    print(m2)
  else:
    print(m1)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
X = list(map(int,input().split()))

m1 = X[int(N/2) - 1]
m2 = X[int(N/2)]

for i in range(N):
    if i < N/2:
        print(m2)
    else:
        print(m1)


Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
4
4


Fixed submission (verdict: Accepted):

N = int(input())
X = list(map(int,input().split()))

Xs = sorted(X)
m1 = Xs[int(N/2)-1]
m2 = Xs[int(N/2)]

for x in X:
    if x < m2:
        print(m2)
    else:
        print(m1)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
arr = input().split()
arr.sort()

for i in range(N):
    if i < N/2:
        print(arr[int(N/2)])
    else:
        print(arr[int(N/2)-1])

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
4
4
3
3


Fixed submission (verdict: Accepted):
N = int(input())
arr = list(map(int, input().split()))
X = arr.copy()
arr.sort()

for i in range(N):
    if X[i] < arr[int(N/2)]:
        print(arr[int(N/2)])
    else:
        print(arr[int(N/2)-1])

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
list_x = list(map(int, input().split()))
sub_list = sorted(list_x)

for one_x in list_x:
  idx = sub_list.index(one_x)
  if idx < n / 2:
    print(sub_list[int(n/2)-1])
  else:
    print(sub_list[int(n/2)])

Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
3
4
4
3


Fixed submission (verdict: Accepted):
n = int(input())
list_x = list(map(int, input().split()))
sub_list = sorted(list_x)

a = sub_list[n 
b = sub_list[n 

for one_x in list_x:
  if one_x <= b:
    print(a)
  else:
    print(b)

Problem: p03379
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
x=list(map(int,input().split()))
N=int(n/2)
for i in range(n):
    y=[]
    for j in range(n):
        if j!=i:
            y.append(x[j])
    print(y)
    y.sort()
    print(y[N-1])


Failing test case input:
4
2 4 4 3

Expected output:
4
3
3
4

Actual output:
[4, 4, 3]
4
[2, 4, 3]
3
[2, 4, 3]
3
[2, 4, 4]
4


Fixed submission (verdict: Accepted):
n=int(input())
x=list(map(int,input().split()))
N=int(n/2)
y=sorted(x)
a=y[N-1]
b=y[N]
for j in range(n):
    if x[j]<=a:
        print(b)
    else:
        print(a)