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: Time Limit Exceeded

Solution code:
import sys
import os

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

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    S = []
    for i in range(N):
        str = input()
        if str not in S:
            S.append(str)

    print(len(S))

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(sum)

Submission status: Time Limit Exceeded

Solution code:
a = int(input())
data = []
ans = 0
flag = 1
for i in range(a):
  tar = input()
  for j in data:
    if tar == j:
      flag = 0
  if flag:
    ans += 1
  data.append(tar)
   
  
  
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
set_list = []
count = 0

for i in range(N):
    S = input()
    if not S in set_list:
        set_list.append(S)
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
# N = 3

items = []

for i in range(0, N) :
    newItem = str(input())
    # newItem = str("apple")
    # print(newItem)
    
    if newItem not in items :
        items.append(newItem)

print(len(items)) # don't forget print()!

Submission status: Time Limit Exceeded

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

for i in range(N):
    flg = 0
    j  = 0
    while(flg == 0 and j < i):
        if i != j:
            if S[j] == S[i]:
                S[j] = ''
                ans = ans - 1
                flg = 1
        j = j+1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

l = list()
c = 0

for i in range(n):
    x = input()
    if x in l:
        c += 0
    else:
        c += 1
        l.append(x)

print(c)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

k = []

for i in range(n):
  s = input()
  if not s in k:
    k.append(s)

print(len(k))

Submission status: Time Limit Exceeded

Solution code:
a = int(input())
List = [(input()) for i in range(a)]

x=[]

for i in List:
    if not (i in x):
        x.append(i)

    
print(len(x))

Submission status: Time Limit Exceeded

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

print(len(uni_S))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
n = int(input())
s = [input() for i in range(n)]
l = deque([])
for i in s:
  if i not in l:
    l.appendleft(i)
    
print(len(l))

Submission status: Time Limit Exceeded

Solution code:

def howManyPresent(N):
    counter = 0
    seen = []
    for i in range(N):
        p = str(input())
        if p in seen:
            continue
        counter += 1
        seen.append(p)
    return counter

N = int(input())
print(howManyPresent(N))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
count = 0
for _ in range(N):
  item = input()
  if (item in A) == False:
    count = count + 1
    A.append(item)
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def main():
    n = int(input())
    data = [input()]
    key = 0
    count = 1
    for i in range(n - 1):
        prod = input()
        for per in data:
            if(per == prod):
                key = 1
                break
        if(key == 0):
            data.append(prod)
            count += 1
        else:
            key = 0
    print(count)




if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

def put_item(table, item):
    for i in range(0, len(table)):
        if table[i][0] == item:
            table[i][1] = table[i][1] + 1
            return 
    table.append([item, 1])

def histogram(data):
    result = []
    for i in range(0, len(data)):
        put_item(result, data[i])
    return result

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

ans =[]
for s in S:
  if s not in ans:
    ans.append(s)
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
import sys
import math
from collections import deque
input = lambda: sys.stdin.readline().rstrip()
Yes = lambda boolean: print('Yes') if boolean else print('No')
YES = lambda boolean: print('YES') if boolean else print('NO')
aint = lambda: int(input())
ints = lambda: list(map(int, input().split()))
is_even = lambda x: True if x%2==0 else False

n = aint()
get = [[],[],[],[],[],[],[],[],[],[]]
ans = 0
for i in range(n):
    s = input()
    if s not in get[len(s)-1]:
        get[len(s)-1].append(s)
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
lGain = []
for i in range(N):
    r = input()
    for j in range(len(lGain)):
        if r == lGain[j]:
            break
    else:
        lGain.append(r)

print(len(lGain))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S = {}
for i in range(N):
    s = input()
    if not(s[0] in S.keys()):
        S[s[0]] = [s]
    elif not(s in S[s[0]]):
        S[s[0]].append(s)

ans = 0
for i in S.values():
    ans += len(i)

print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
lotteries = []
for i in range(0,N):
    lotteries.append(input())

answer = list()
for i in lotteries:
    if not (answer.__contains__(i)):
        answer.append(i)
    else:
        continue

print(len(answer))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
s=["" for i in range(n)]
for i in range(n):
    s[i]=input()
ans=[]
for sj in s:
    l = len(ans)
    tf = True
    for i in ans:
        if i==sj:
            tf = False
            break
    if tf == True:
        ans.append(sj)
print(len(ans))

Submission status: Time Limit Exceeded

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

count = 0
counted = []

for s in S:
  if s in counted:
    continue
  else:
    counted.append(s)
    count += 1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
L = []
for _ in range(N):
    s = input()
    if s in L:
        pass
    else:
        L.append(s)

print(len(L))

Submission status: Time Limit Exceeded

Solution code:
# gacha

n = int(input())
ln = []
for i in (range(n)):
    stn = input()
    if stn in ln:
        pass
    else:
        ln.append(stn)
print(len(ln))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
h = list(input() for x in range(N))
a = []
for i in range(0, N):
    if h[i] not in a:
        a.append(h[i])
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
n=input()
count=0;
lis=[]
for i in range(0,int(n)):
    s=input()
    if s in lis:
        pass
    else :
        lis.append(s)
        count+=1
print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
list = []
for i in range(N):
  s = str(input())
  for x in list:
    if x == s: break
  else:
    list.append(s)
print(len(list))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S_list = [input() for i in range(N)]
count = 0
while len(S_list) > 0:
    S_list = [s for s in S_list if s != S_list[0]]
    count += 1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
import math
from collections import deque
input = lambda: sys.stdin.readline().rstrip()
Yes = lambda boolean: print('Yes') if boolean else print('No')
YES = lambda boolean: print('YES') if boolean else print('NO')
aint = lambda: int(input())
ints = lambda: list(map(int, input().split()))
is_even = lambda x: True if x%2==0 else False

n = aint()
get = [[],[],[],[],[],[],[],[],[],[]]
for i in range(n):
    s = input()
    if s not in get[len(s)-1]:
        get[len(s)-1].append(s)

ss = 0
for cont in get:
    ss += len(cont)
print(ss)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

S = []

for i in range(N):
    inpt = input()
    if inpt in S:
        continue
    S.append(inpt)

print(len(S))

Submission status: Time Limit Exceeded

Solution code:
import sys
import os

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

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

    S = []
    val = 0
    for i in range(N):
        str = input()
        if str not in S:
            val += 1
            S.append(str)

    print(val)

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
s = []
p = []
ans = 0
for i in range(n):
    s.append(input())
    if s[i] in p:
        pass
    else:
        p.append(s[i])
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N =int(input())
keihin =[]
ans = 0
for _ in range(N):
    S = input()
    if S in keihin:
        continue
    else:
        keihin.append(S)

print(len(keihin))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

word_list = []

for i in range(n):
    word = input()
    if(word in word_list):
        continue
    word_list.append(word)
    
        

print(len(word_list))

Submission status: Time Limit Exceeded

Solution code:
l = list()
for _ in range(int(input())):
    c = input()
    if c not in l:
        l.append(c)
print(len(l))
l.append(c)

Submission status: Time Limit Exceeded

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

print(c)

Submission status: Time Limit Exceeded

Solution code:
import collections
n=int(input())
a=[]
c=0
for _ in range(n):
    b = input()
    if b not in a:
        a.append(b)
        c+=1
print(c)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S = []
ans = N
for i in range(N):
    S.append(input())
    for j in range(i):
        if i != j:
            if S[j] == S[i]:
                S[j] = ''
                ans = ans - 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
def inlist(lista,item):
    for i in lista:
        if item==i:
            return True
    return False


itemsList=[]
num=int(input())
for i in range(num):
    temp=input()
    if not inlist(itemsList,temp):
        itemsList.append(temp)
print(len(itemsList))

Submission status: Time Limit Exceeded

Solution code:
num=int(input())
list0=[]
sum=0
for i in range(num):
  date=input()
  list0.append(date)
  j=0
  a=0
  if len(list0)-2>=0:
    for j in range(len(list0)-1):
        if list0[j]==date:
            a+=1
  if a==0:
    sum+=1
print(sum)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
count = 0
for _ in range(N):
  item = input()
  if (item in A) == False:
    count = count + 1
  A.append(item)
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
got = []

for i in range(n):
    prize = input()
    if prize not in got:
        got += [prize]

print(len(got))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
alpha=[chr(i) for i in range(97, 97+26)]
d={i:[[],[],[],[],[],[],[],[],[],[]] for i in alpha}
ans=0
for _ in range(n):
    s=input()
    if s not in d[s[0]][len(s)-1]:
        d[s[0]][len(s)-1].append(s)
        ans+=1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
ls = []
count = 0
for i in range(n):
	buf = input()
	if buf in ls:continue 
	ls.append(buf)
	count+=1
print(count)

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!
N,= map(int, input().split())
S=[]
su=0
for i in range(N):
    a = input()
    if(not a in S):
        su+=1
    S+=[a]    
print(su)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

tmp = []
ans = 0
for _ in range(N):
    S = input()
    if S not in tmp:
        tmp.append(S)
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S = []
for _ in range(N):
    keihin = input()
    if keihin not in S:S.append(keihin)

print(len(S))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = []
for i in range(n):
    b = input()
    if b not in a:
        a += [b]
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

syohin = []
kind = 0

for i in range(N):
    S = input()
    if S not in syohin:
        kind += 1
        syohin.append(S)

print(kind)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(len(S))

Submission status: Time Limit Exceeded

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

for i in range(N):
    for j in range(len(lGain)):
        if lResult[i] == lGain[j]:
            break
    else:
        lGain.append(lResult[i])

print(len(lGain))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
S=set({})
for _ in range(N):
  S = S | {input()}
  
x=list(S)
print(len(x))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

arr = []
counter = 0

for i in range(N):
    string = input()
    if not string in arr:
        counter += 1
        arr.append(string)

print(counter)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
goods = []
for _ in range(n):
  check = input()
  if check not in goods:
    goods.append(check)

print(len(goods))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

N = int(input())
p_list = []
count = 0

while N > 0:
    S = input()
    if S not in p_list:
        p_list.append(S)
        count += 1
    else:
        pass
    N -= 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
li = []
count = 0
for n in range(N):
    i = input()
    if i in li:
        pass
    else:
        li.append(i)
        count+=1
print(count)

Submission status: Time Limit Exceeded

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

for item in s:
    if(item not in bag):
        bag.append(item)

print(len(bag))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
sum = 0
l = []
for _ in range(0,n):
    s = input()
    if s in l:
        continue
    else:
        l.append(s)
        sum += 1

print(sum)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

count = 0
List = []
for i in range(n):
    s = input()
    if s not in List:
        count += 1
        List.append(s)

print(count)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
S=[]
for _ in range(n):
    s=str(input())
    if s in S:
        continue
    else:
        S.append(s)
print(len(S))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
h = [input() for x in range(N)]
a = []
for i in range(0, N):
    if h[i] not in a:
        a.append(h[i])
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
N =int(input())
keihin =[]
ans = 0
for _ in range(N):
    S = input()
    if S in keihin:
        continue
    else:
        keihin.append(S)
        ans+=1

print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
s = []

for i in range(n):
	ts = input()
	ad = True

	for j in s:
		if ts == j:
			ad = False

	if ad :
		s.append(ts)


print(len(s))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
l = list()
for _ in range(int(input())):
    c = input()
    if c in l:
        pass
    else:
        l.append(c)
print(len(l))

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env/ python3
#S = input()
N = int(input())
#A, B, C = input().split()
#N, M = map(int, input().split())

#N = int(input())
#A = [int(x) for x in input().split()]

#H, W = map(int, input().split())
S = []
count = 0
for i in range(N):
    tmp = input()
    if tmp not in S:
        count += 1
        S.append(tmp)
print(count)

Submission status: Time Limit Exceeded

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

tango = []
count = 0
for i in s:
  if i not in tango:
    count += 1
    tango.append(i)
print(count)

Submission status: Time Limit Exceeded

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


for i in range(N):
  s = input()
  if s in S:
    pass
  else:
    S.append(s)
    A += 1

print(A)

Submission status: Time Limit Exceeded

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

print(len(keihin))

Submission status: Time Limit Exceeded

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

print(len(S))

Submission status: Time Limit Exceeded

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

items = []

for i in range(n):
    new = True
    for j in range(len(items)):
        if s[i] == items[j]:
            new = False
    if new:
        items.append(s[i])
    
print(len(items))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
ans = 0
for _ in range(N):
  B = input()
  if not B in A:
    ans += 1
    A.append(B)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
#200426C
N = int(input())

X = []
ans = 0
for i in range(N):
    S = str(input())
    if X.count(S)==0:
        X.append(S)
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N = int(input())
list = []
# 文字列の入力
for i in range(N):
    s = input()
    if not s in list:
        list.append(s)

#print(list)
print(len(list))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S = ["" for _ in range(N)]
num = 0
for i in range(N):
  X = input()
  if not X in S:
    S[i] = X
    num += 1
print(num)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())
ans = N
for i in range(N):
    for j in range(i):
        if i != j:
            if S[j] == S[i]:
                S[j] = ''
                ans = ans - 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
ls = []
count = 0
for x in range(n):
    ls.append(input())
li2 = []
for i in ls:
    if i not in li2:
        li2.append(i)
        count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!
N,= map(int, input().split())
S=[]
su=0
for i in range(N):
    a= input()
    if(a in S):
        continue
    S+=[a]
    su+=1
print(su)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
d={}
for i in range(n):
    s=input()
    if s not in d.values():
        d[len(d)]=s

print(len(d))

Submission status: Time Limit Exceeded

Solution code:
def main():
    n = int(input())
    oridata = [input() for i in range(n)]
    data = [oridata[0]]
    key = 0
    for i in range(1,n):
        for per in data:
            if(per == oridata[i]):
                key = 1
                break
        if(key == 0):
            data.append(oridata[i])
        else:
            key = 0

    print(len(data))


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
import collections

N = int(input())
keihin=[]

for i in range(N):
    present = input()
    keihin = np.append(keihin, present)

c = collections.Counter(keihin)
print(len(c))

Submission status: Time Limit Exceeded

Solution code:
#coding:utf-8

n = int(input())
l = []
count = 0

for i in range(n):
    s = str(input())
    if s not in l:
        l.append(s)
        count += 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[]
for i in range(n):
    b=input()
    a.append(b)
b=n-1
c=0
for i in range(n-1):
    d=a.count(a[b])
    if d==1:
        b-=1
    else:
        del a[b]
        b-=2
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[]

a.append(str(input()))

for i in range(n-1):
  flag = 1
  tmp = str(input())
  for j in range(len(a)):
    if a[j] == tmp:
      flag = 0
      break
  if flag == 1:
    a.append(tmp)

print(len(a))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

S = []
counter = 0
for i in range(N):
    temp = input()
    if not temp in S:
        counter += 1
    S.append(temp)

print(counter)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
List = []
A = ''
for i in range(0,N):
    A = input()
    if A not in List:
        List += [A]
print(len(List))

Submission status: Time Limit Exceeded

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

for i in range(N):
    if S[i] in check_list:
        continue;
    else:
        count += 1
        check_list.append(S[i])

print(count)

Submission status: Time Limit Exceeded

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

for i in range(N):
    S=input()
    if S in A:
        continue
    else:
        A.append(S)

print(len(A))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

goods = []

for i in range(N):
    S = input()
    if S not in goods:
        goods.append(S)

print(len(goods))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
##s=[i for i in map(str,input().split())]
list=[]
for i in range(n):
    s=input()
    if(s not in list):
        list.append(s)

print(len(list))

Submission status: Time Limit Exceeded

Solution code:
def main():
    n = int(input())

    items = []

    for x in range(n):
        s = input()
        if s not in items:
            items.append(s)

    print(len(items))


main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
ss = []
for i in range(n):
  s = input()
  push = True
  for j in ss:
    if s == j:
      push = False
      break
  if push:
    ss.append(s)
print(len(ss))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
prize_list=[]
for i in range(n):
    x = input()
    if x not in prize_list:
        prize_list.append(x)

print(len(prize_list))

Submission status: Time Limit Exceeded

Solution code:
tmp = input().split()
N = int(tmp[0])

ListG = []

for i in range(N):
    Si = input().split()
    p = Si in ListG
    if not p :
        ListG.append(Si)
    
print(len(ListG))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
items = []
for _ in range(n):
    s = input()
    if s not in items:
        items.append(s)
    else:
        continue
print(len(items))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S = [ [],[],[],[],[],[],[],[],[],[] ]
ans = 0
for i in range(N):
  temps = input()
  if(temps not in S[len(temps)-1]):
    ans += 1
    S[len(temps)-1].append(temps)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
list = []

addFlag = True

for x in range(n):
    text = input()
    addFlag = True
    for y in list:
        if text == y:
            addFlag = False
            break
    if addFlag:
        list.append(text)
        
print(len(list))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(len(S))

Submission status: Time Limit Exceeded

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

tango = []
count = 0
for i in s:
  if i not in tango:
    count += 1
    tango.append(i)
print(count)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
N = int(input())
list = []
# 文字列の入力
for i in range(N):
    s = input()
    if not s in list:
        list.append(s)

#print(list)
print(len(list))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(N):
    n = input()
    if n in str_list:
        continue
    else:
        str_list.append(n)
print(len(str_list))

Submission status: Time Limit Exceeded

Solution code:
keihin = int(input())

keihin_list = []
for i in range(keihin):
    now_keihin = input()
    if now_keihin not in keihin_list:
        keihin_list.append(now_keihin)

print(len(keihin_list))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
items = [input()]
ans = 1

def binarysearch(items, item):
  xl = -1
  xr = len(items)
  while abs(xl-xr) > 1:
    xs = (xr+xl)//2
    if items[xs] == item:
      return True, -1
    elif items[xs] > item:
      xr = xs
    else:
      xl = xs
  return False, xr
    

for _ in range(N-1):
  item = input()
  found, insert = binarysearch(items, item)
  if not found:
    ans += 1
    items.insert(insert, item)

print(ans)