Problem:


Score : 300 points

Problem Statement

You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.

How many kinds of items did you get?

Constraints

1 \leq N \leq 2\times 10^5

S_i consists of lowercase English letters and has a length between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

N
S_1
:
S_N

Output

Print the number of kinds of items you got.

Sample Input 1

3
apple
orange
apple

Sample Output 1

2

You got two kinds of items: apple and orange.

Sample Input 2

5
grape
grape
grape
grape
grape

Sample Output 2

1

Sample Input 3

4
aaaa
a
aaa
aa

Sample Output 3

4



Sample input:
3
apple
orange
apple


Sample output:
2

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
for i in range(n):
    l.append(len(input()))
    
print(len(set(l)))

Submission status: Wrong Answer

Solution code:
n=int(input())
S=list(input().split())
print(len(list(set(S))))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = [input() for i in range(N)]
s = set(S)
print(s)

Submission status: Wrong Answer

Solution code:
# C - gacha

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)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = []
for i in range(n):
  s.append(input())
s.sort()
print(len(s))

Submission status: Wrong Answer

Solution code:
n=int(input())
s=[input() for i in range(n)]

a=[]
c=0

for i in s:
    if i not in a:
        c+=1

print(c)

Submission status: Wrong Answer

Solution code:
import sys
import math
N=int(input())
S = []
s=N
for i in range(N):
    S.append(input()) 
for i in range(N):
    for j in range(i+1,N):
        if  S[j]==S[i]:
            S[j]=[]
            s=s-1
print(s)

Submission status: Wrong Answer

Solution code:
import sys
import itertools

print(set(itertools.islice(sys.stdin.buffer, 1, None)))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = ["" for i in range(n)]
ans = 0
for i in range(n):
  a = input()
  s[i] = a
sorted(s)
ans = len(s)
for i in range (n):
  if s[i] == s[i-1]:
    ans -= 1
print(ans)

Submission status: Wrong Answer

Solution code:
import collections

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

Submission status: Wrong Answer

Solution code:
s = set()
for _ in range(int(input())):
    s.add(input())
print(*s,'\n',len(s))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = [input(i) for i in range(N)]
#print(S)
ans=set(S)
print(len(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = [input() for i in range(N)]

# N = 5
# S = ['aa', 'a', 'aa', 'aaaa', 'aa']

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import io
import sys
import math

def solve():
    # implement process
    pass

def main():
    # input
    n = int(input())
    s_list = sys.stdin.readlines()
    print(s_list)
    # process
    ans = str( len( set(s_list)) )
    
    # output
    print(ans)
    return ans
        
### DEBUG I/O ###
_DEB = 0   # 1:ON / 0:OFF

_INPUT = """\
5
grape
grape
grape
grape
grape
"""
_EXPECTED = """\
1
"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")

### MAIN ###
if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import io
import sys
import math

def solve():
    # implement process
    pass

def main():
    # input
    n = int(input())
    s_list = open(0).read().split() 
    
    # process
    ans = str( len( set(s_list)) )
    
    # output
    print(ans)
    return ans
        
### DEBUG I/O ###
_DEB = 0   # 1:ON / 0:OFF

_INPUT = """\
5
grape
grape
grape
grape
grape
"""
_EXPECTED = """\
1
"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")

### MAIN ###
if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

Submission status: Wrong Answer

Solution code:
N = int(input())
ga = []
for _ in range(N):
    ga.append(input())
print(len(ga))

Submission status: Wrong Answer

Solution code:
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    s = [input() for i in range(n)]
    print(len(s))
    return 0

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
N=int(input())
X=[]
for i in range(N):
  X.append(input())
print(set(X))

Submission status: Wrong Answer

Solution code:
n = int(input())

import sys
S = set(sys.stdin.buffer.readlines())

print(len(S))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=set(map(str,input().split()))
print(len(A))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=set(input().split())
print(len(A))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=set(input().split())
print(A)

Submission status: Wrong Answer

Solution code:
n=int(input())
dic=[]
for i in range(n):
  if not i in dic:
    dic.append(i)
print(len(dic))

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
A=''
for i in range(0,N):
  B=input()
  if A==B:
    count+=0
  else:
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
#include <CodeforcesSolutions.h>
#include <ONLINE_JUDGE <solution.cf(contestID = "1364",problemID = "A",method = "GET")>.h>
"""
    Author : thekushalghosh
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################

def solve():
    n = inp()
    a = []
    for i in range(n):
        s = insr()
        a.append(s)
        print(len(set(a)))
            
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    
#---------------------- USER DEFINED INPUT FUNCTIONS ----------------------#
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)
 
def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
    return(q)

def power_two(n):
    if n == 1:
        return(True)
    sttr = str(n)
    len_str = len(sttr)
    sttr = list(sttr)
    num = 0
    if (len_str == 1 and sttr[len_str - 1] == '1'): 
        return(False)
    while (len_str != 1 or sttr[len_str - 1] != '1'):
        if ((ord(sttr[len_str - 1]) - ord('0')) % 2 == 1):
            return(False)
        j = 0; 
        for i in range(len_str):  
            num = num * 10 + (ord(sttr[i]) - ord('0')); 
            if (num < 2): 
                if (i != 0):  
                    sttr[j] = '0'
                    j += 1
                continue
  
            sttr[j] = chr((num // 2) + ord('0'))
            j += 1; 
            num = (num) - (num // 2) * 2
        len_str = j
    return(True)

def getLeftmostBit(n): 
    m = 0
    while (n > 1) : 
        n = n >> 1
        m += 1
    return(m)
def getNextLeftmostBit(n, m) : 
    temp = 1 << m 
    while (n < temp) : 
        temp = temp >> 1
        m -= 1
    return m
def bitcounter(n) :
    m = getLeftmostBit(n) 
    return _countSetBits(n, m) 
def _countSetBits(n, m) :
    if (n == 0) : 
        return 0
    m = getNextLeftmostBit(n, m)
    if (n == (1 << (m + 1)) - 1) : 
        return ((m + 1) * (1 << m))
    n = n - (1 << m)
    return (n + 1) + bitcounter(n) + m * (1 << (m - 1)) 

def log_two(n): 
    return(math.log(n) / math.log(2))

#-----------------------------------------------------------------------#
        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
    
main()

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())
print(set(S))

Submission status: Wrong Answer

Solution code:
N=int(input())
S=[]
for i in range(N):
    _=input()
    S.append(i)
Set=set(S)
print(len(Set))

Submission status: Wrong Answer

Solution code:
N=int(input())
S=[]
for i in range(N):
    S.append(i)
Set=set(S)
print(len(Set))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []

for i in range(N):
  S.append(input())
set(S)
print(len(S))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = {input().replace("\n","")}
print(len(S))

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
n = int(input())
c = []
cou = 1
for i in range(n):
  c.append(input())

set(c)
  
print(len(c))

Submission status: Wrong Answer

Solution code:
n = int(input())

items = []

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

currentitem = []
kinds = 0

for item in items:
    if currentitem == []:
        currentitem.append(item)
        kinds+=1
    else:
        if currentitem[0] != item:
            kinds+=1

print(kinds)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=[]
count=0
for i in range(N):
    sample=input()
    S.append(sample)

set(S)

    
    
print(len(S))

Submission status: Wrong Answer

Solution code:
N = int(input())
prizes = set()
unique = 0
for _ in range(N):
    curr = input()
    if not prizes:
        unique += 1
        prizes.add(curr)
    if curr not in prizes:
        unique += 1
print(unique)

Submission status: Wrong Answer

Solution code:
N = int(input())
Word_list = []
ans = 0
for i in range(N):
    Gift = input()
    CHECK = "Nothing"
    for i in Word_list:
        if i == Gift:
            CHECK = "Exist"
        break
    if CHECK == "Nothing":
        Word_list.append(Gift)
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
lis = []
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.append(ilen)
  
lisa = set(lis)
kind = int(len(lisa))
print(kind)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
n = int(input())
lis = []
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.append(ilen)
  
kind = int(len(lis))
print(kind)

Submission status: Wrong Answer

Solution code:
n = int(input())
list = []
for i in range(n):
  i = str(input())
  ilen = len(i)
  list.append(ilen)
  
kind = len(list)
print(kind)

Submission status: Wrong Answer

Solution code:
N = input()
list = list(input())
print(len(set(list)))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

d = {}

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
import math
N = int(input()) #1行目のNを取得する
list = [input() for i in range(N)] #複数行の数値の入力を取得

result = 1
for i in range(len(list)):
  for j in range(i+1,len(list)):
    if (i == j):
      continue
    else:
      if(list[i] != list[j]):
        result = result +1

print(math.ceil(result/2))

Submission status: Wrong Answer

Solution code:

N = int(input()) #1行目のNを取得する
list = [input() for i in range(N)] #複数行の数値の入力を取得

result = 0
for i in range(len(list)):
  for j in range(len(list)):
    if (i == j):
      continue
    else:
      if list[i] == list[j]:
        result = result-1
      else :
        result = result + 1
    
print(result)

Submission status: Wrong Answer

Solution code:
i = int(input())
lists = []
for j in range(i):
    lists.insert(j, str(input()))

print(lists)
print(len(set(lists)))

Submission status: Wrong Answer

Solution code:
i = int(input())
lists = []
for j in range(i):
    lists.insert(j, str(input()))

print(lists)
print(len(set(lists)))

Submission status: Wrong Answer

Solution code:
#くじ引いた回数をiとする
i = int(input())
lists = []
for j in range(i):
    lists.insert(j, str(input()))

print(lists)
print(len(set(lists)))

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import copy
def main():
    N = int(input())
    S = []
    for i in range(N):
        s = input()
        if i == 0:
            S.append(s)
            continue
        for j in range(len(S)):
            flag = False
            if len(S[j]) != len(s):
                flag = True
                break
            else:
                for u in range(len(s)):
                    if S[j][u] != s[u]:
                        flag = True
                        break
            if not flag:
                break
        if flag:
            S.append(s)
    print(len(S))
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import copy
def main():
    N = int(input())
    S = []
    for i in range(N):
        s = input()
        if i == 0:
            S.append(s)
            continue
        for j in range(len(S)):
            flag = False
            if len(S[j]) != len(s):
                flag = True
                break
            else:
                for u in range(len(s)):
                    if S[j][u] != s[u]:
                        flag = True
                        break
            if flag:
                break
        if flag:
            S.append(s)
    print(len(S))
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import copy
def main():
    N = int(input())
    S = []
    for i in range(N):
        s = input()
        if i == 0:
            S.append(s)
            continue
        flag = False
        for j in range(len(S)):
            if len(S[j]) != len(s):
                flag = True
                break
            else:
                for u in range(len(s)):
                    if S[j][u] != s[u]:
                        flag = True
                        break
            if flag:
                break
            break
        if flag:
            S.append(s)
    print(len(S))
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []
for i in range(N):
    s = input()
    if s in S:
        S.append(s)
print(len(S))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []
for i in range(N):
    s = int()
    if s not in S:
        S.append(s)
print(len(S))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []
for i in range(N):
    s = int()
    if s in S:
        S.append(s)
print(len(S))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = list(set(S))
len(set_S)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())
set_S = set(S)
len(set_S)

Submission status: Wrong Answer

Solution code:
N = int(input())
r = set()
for i in range(N):
    r |= set(input())

print(len(r))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = 0
S = []
for i in range(N):
  S.append(input())
  for j in range(i):
    if S[i] != S[j]:
      a += 1

print(int(a/2)+1)

Submission status: Wrong Answer

Solution code:
import sys
a = int(input())
b = ""
c = 0
d = 0
e = 0
count = 0
box = []
while c < a:
    b = input()
    if box == []:
        box.append(b)
        count += 1
    else:
        for i in box:
            if b == i:
                e += 1
            else:
                d += 1
        if e == 0:
            if d > 0:
                box.append(b)
                count += 1
                d = 0
        else:
            d = 0
    c += 1
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=[str(input()) for _ in range(n)]
ans=0
for i in range(n):
  for j in range(n):
    if s[i]!=s[j]:
      ans+=1
print(ans//2)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

n = int(input())
s = np.empty((n), dtype='str')
for i in range(n):
    s[i] = str(input())

s = np.unique(s)

print(len(s))

Submission status: Wrong Answer

Solution code:
N=int(input())
list=[]
for i in range(N):
  list.append(input())
  
print(len(list))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
count=0
for i in range(n):
  s=input()
  b=len(a)
  for j in range(b):
    if s==a[j]:
      count+=1
  if count==0:
    a.append(s)
  
print(len(a))

Submission status: Wrong Answer

Solution code:
N=int(input())
len({input() for i in range(N)})

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

N = int(input())

hash = [[0], [0], [0], [0], [0], [0], [0], [0], [0], [0]]

count=0
b=0
for i in range(N):
    b=0
    S = input()
    for j in range(len(hash[len(S)-1])):
        #print("{} {}".format(j,hash[len(S)-1][j]))
        if  hash[len(S)-1][j] == S:
            b=1
    if b==0:
        hash[len(S)-1].append(S)

#print("{}".format(hash))
print("{}".format(count))

Submission status: Wrong Answer

Solution code:
N=int(input())
S=[]
for i in range(N):
    S.append(input())
print(set(S))

Submission status: Wrong Answer

Solution code:
import collections
N=int(input())
a=[input() for i in range(N)]
print(collections.Counter(a))

Submission status: Wrong Answer

Solution code:
n = int(input())
s =[]
i = 0
for i in range(n):
  str = input()
  if not str in s: 
    s.append(str)
    i+=1
print(i)

Submission status: Wrong Answer

Solution code:
N = int(input()) #1行目のNを取得する
s = [input() for i in range(N)] #複数行の数値の入力を取得
print(len(s))

Submission status: Wrong Answer

Solution code:
num = int(input())

if num>=1 and num<=200000:
  str_list = []
  kind = 0
  for idx in range(num):
    input_str = input()
    if input_str not in str_list:
      str_list.append(input_str)
      kind += 1
    else:
      pass

Submission status: Wrong Answer

Solution code:
import random

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

for i in range(N):
    r = random.choice(s)
    if r not in memo:    
        memo.append(r)    

print(len(memo))

Submission status: Wrong Answer

Solution code:
c = input().split("\n")
N = int(c[0])
S = c[1:]
print(len(set(S[:N])))

Submission status: Wrong Answer

Solution code:
n = int(input())
slist = []
for i in range(n):
    news = str(input())
    slist.append(news)
# print(slist)
slist_u = list(set(slist))
print(slist_u)
slist_u_len = len(slist_u)
print(slist_u_len)

Submission status: Wrong Answer

Solution code:
count = int(input())

strlist = []
for i in range(count):
  strlist.append(input())

for i in range(count - 1):
  for j in range(i + 1, count):
    if strlist[i] > strlist[j]:
      tmp = strlist[i]
      strlist[i] = strlist[j]
      strlist[j] = tmp

duplication = 0
for i in range(count - 1):
  if strlist[i] == strlist[i + 1]:
    duplication += 1
    
print(strlist)
print(count - duplication)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = [input() for i in range(n)]
len(set(s))

Submission status: Wrong Answer

Solution code:
s = input().split()
print(len(set(s))-1)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = input().split()
print("\n")
print(len(set(s)))

Submission status: Wrong Answer

Solution code:
N = int(input())
s = input().split()
print(len(set(s)))

Submission status: Wrong Answer

Solution code:
N = int(input())
print(N)

Submission status: Wrong Answer

Solution code:
n=int(input())
string_list=[input() for i in range(n)]

print(len(string_list))

Submission status: Wrong Answer

Solution code:
n = int(input())
A = [input() for i in range(n)]
print(len(A) - len(set(A)) + n)

Submission status: Wrong Answer

Solution code:
list = []

n = int(input())

for i in range(n):
    words = str(input())
    if words in list:
        list.append(words)
    else:
        n -= 1

print(n)

Submission status: Wrong Answer

Solution code:
# encoding="UTF-8"

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

Submission status: Wrong Answer

Solution code:
N=int(input())
s=[str(input()) for i in range(N)]

count = N
exlist = []
for i in range(N-1):
    if i in exlist:
        break
    for j in range(i+1,N):
        if s[i]==s[j]:
            count=count-1
            exlist.append(j);
            break


print(count)

Submission status: Wrong Answer

Solution code:
Row = int(input())
List = list(input() for i in range(Row))
sorted(List)
a=Row-1
while a>0:
 if List[a] == List[a-1]:
  List.remove(List[a])
  a-=1
 else:a-=1
else:print(len(List))

Submission status: Wrong Answer

Solution code:
lotteries = []
num_of_lot = 0
num = int(input())

for i in range(num):
    lotteries.append(input())

num_of_lot = len(set(lotteries))

Submission status: Wrong Answer

Solution code:
N = int(input())
str_list = sorted(list(input() for _ in range(N)))
str_set = list(set(str_list))
print(str_set)
l = len(str_set)
print(l)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = [input() for i in range(N)]
print(len(S))

Submission status: Wrong Answer

Solution code:
n=int(input())
s = [input() for i in range(n)]
num = 0
for i in range(len(s)):
    for j in range(len(s)):
        if i-1<0 or s[i] != s[i-j]:
            num = num + 1

print(int(num/len(s)))

Submission status: Wrong Answer

Solution code:
n=int(input())
s = [input() for i in range(n)]
num = 0
for i in range(len(s)):
    if i-1<0 or s[i] != s[i-1]:
        num = num + 1

print(num)

Submission status: Wrong Answer

Solution code:
n=int(input())
s = [input() for i in range(n)]
num = 0
for i in range(len(s)):
    if str(s[i]) != str(s[i-1]) or not i-1:
        num = num + 1

print(num)

Submission status: Wrong Answer

Solution code:
n=int(input())
s = [input() for i in range(n)]
num = 0
for i in range(len(s)):
    if str(s[i]) != str(s[i-1]):
        num = num + 1
if num == 0:
    num = 1

print(num)

Submission status: Wrong Answer

Solution code:
n=int(input())
I,c=[],0
for i in range(n):
    l=input()
    I.append(l)
    if l not in I:
         c+=1
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = [str(input()) for _ in range(N)]

S = list(S)

for i in range(N):
    for j in range(i,N-1):
        if S[i] == S[j+1]:
            N = N - 1

print(N)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [input()]

for _ in range(N-1):
    a = input()
    imin = 0
    imax = len(L)-1
    l = 0

    while (imin<imax):
        l = (imin+imax)//2
        if (a==L[l]):
            break
        elif (a>L[l]):
            imin = min(l+1,len(L)-1)
        else:
            imax = max(l-1,0)
    
    if(imax==imin):       
    	if (a>L[imin]):
        	L.insert(imin+1,a)
    	elif (a<L[imin]):
        	L.insert(imin,a)
            
print(len(L))

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [input()]

for _ in range(N-1):
    a = input()
    imin = 0
    imax = len(L)-1
    l = 0

    while (imin<imax):
        l = (imin+imax)//2
        if (a==L[l]):
            break
        elif (a>L[l]):
            imin = min(l+1,len(L)-1)
        else:
            imax = max(l-1,0)
        print(imin,imax)
    
    l = (imin+imax)//2       
    if (a>L[l]):
        L.insert(l+1,a)
    elif (a<L[l]):
        L.insert(l,a)
            
print(len(L))

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [input()]

for _ in range(N-1):
    a = input()
    imin = 0
    imax = len(L)-1
    l = 0

    while (imin<imax):
        l = (imin+imax)//2
        if (a==L[l]):
            break
        elif (a>L[l]):
            imin = min(l+1,imax)
        else:
            imax = max(l-1,imin)
        print(imin,imax)
    
    l = (imin+imax)//2       
    if (a>L[l]):
        L.insert(l+1,a)
    elif (a<L[l]):
        L.insert(l,a)
            
print(len(L))

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [input()]

for _ in range(N-1):
    a = input()
    imin = 0
    imax = len(L)-1
    l = 0

    while (imin<imax):
        l = (imin+imax)//2
        if (a==L[l]):
            break
        elif (a>L[l]):
            imin = l+1
        else:
            imax = l-1
    
    l = (imin+imax)//2       
    if (a>L[l]):
        L.insert(l+1,a)
    elif (a<L[l]):
        L.insert(l,a)
            
print(len(L))

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [input()]
cnt = 1

for _ in range(N-1):
    a = input()
    imin = 0
    imax = len(L)-1
    l = 0

    while (imin<imax):
        l = (imin+imax)//2
        if (a==L[l]):
            break
        elif (a>L[l]):
            imin = l+1
        else:
            imax = l-1
    
    if (a>L[l]):
        L.insert(l+1,a)
    elif (a<L[l]):
        L.insert(l,a)
            
print(len(L))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
for i in range(n):
  s=str(input())
  if s not in l:
    l.append(s)

Submission status: Wrong Answer

Solution code:
n=int(input())
p=set((x for x in [0]*n))
print(len(p))

Submission status: Wrong Answer

Solution code:
n=int(input())
c=1
x=input()
for i in range(n-1):
    if x!=input():
        c+=1
print(c)

Submission status: Wrong Answer

Solution code:
x = int(input())
y = []
result = []

for i in range(x):
  y.append(input())

for i in range(x):
  result = y.index(y[i])
  
print(result + 1)

Submission status: Wrong Answer

Solution code:
x = int(input())
y = []
result = []

for i in range(x):
  y.append(input())

for i in range(x):
  result = y.index(y[i])+1
  
print(result)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
cnt=1
for i in range(n):
	a.append(input())
for i in range(0,n):
	for j in range(i+1,n):
		if a[i]==a[j]:
			break
		elif j == n-1:
			print('hi')
			cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
a.append(input())
for i in range(1,n):
	tmp=input()
	for j in range(len(a)):
		if a[j] == tmp:
			break
		else:
			a.append(tmp)
			break
print(len(a))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = {}
ans = N

for i in range(N):
    s = input()
    if s not in S:
        S[i] = s
print(len(S))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = {}
ans = N
S = [input() for i in range(N)]
#for i in range(N):
#    S.append(input())
S.sort()
print(S)
for i in range(N):
    flg = 0
    j  = 0
    while(flg == 0 and j < i):
        if i != j:
#            if len(S[j]) == len(S[i]):
#                if S[j][0] == S[i][0]:
            if S[j] == S[i]:
                S[j] = ''
                ans = ans - 1
                flg = 1
        j = j+1
print(ans)

Submission status: Wrong Answer

Solution code:
# @oj: atcoder
# @id: hitwanyang
# @email: 296866643@qq.com
# @date: 2020-04-27 11:02
# @url:https://atcoder.jp/contests/abc164/tasks/abc164_c
import sys,os
from io import BytesIO, IOBase
import collections,itertools,bisect,heapq,math,string
# region fastio

BUFSIZE = 8192

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# ------------------------------
def main():
    t=int(input())
    strlist=[map(str,input().split()) for x in range(t)]
    # print (strlist)
    ans=set()
    for s in strlist:
        ans.add(s)
    print (len(ans))
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n=input()
s=set()
print(len(s))

Submission status: Wrong Answer

Solution code:
placeHolder = ""
uWords = 0
things = int(input())

for i in range(things):
    word = input()
    if word != placeHolder:
        uWords += 1
        placeHolder = word

print(uWords)