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: Accepted

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

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

S.sort()
ans = 0
for i in range(N):
	if i == N-1:
		ans += 1
	else:
		if S[i] != S[i+1]:
			ans += 1
print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict

n = int(input())
ss = [input().strip() for _ in range(n)]

d = defaultdict(int)

for s in ss:
    d[s] += 1

cnt = len(d.keys())

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
tatelist = [input() for i in range(n)]

print(len(set(tatelist)))

Submission status: Accepted

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

N = int(input())

dict_item = {}
count = 0

for i in range(N):
  S = input()
  if S not in dict_item.keys():
    dict_item[S] = 1
    count += 1

print(count)

Submission status: Accepted

Solution code:
n = int(input())
ans = set()
for _ in range(n):
    ans.add(input())
print(len(ans))

Submission status: Accepted

Solution code:
N = int(input())
res = set()
for i in range(N):
  a = input()
  res.add(a)
print(len(res))

Submission status: Accepted

Solution code:
N = int(input())
got = set()

for _ in range(N):
    got.add(input())

print(len(got))

Submission status: Accepted

Solution code:
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
from collections import Counter
def resolve():
    N = ir()
    S = []
    for i in range(N):
        S.append(sr())
    print(len(Counter(S).keys()))
resolve()

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    S = [input() for _ in range(n)]
    print(len(set(S)))



if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
n = int(input())
s = list(input() for _ in range(n))
print(len(list(set(s))))

Submission status: Accepted

Solution code:
n=int(input())
ans=set()
for i in range(n):
    s=input()
    ans.add(s)
print(len(ans))

Submission status: Accepted

Solution code:
import sys
Debug = lambda *args: None
if len(sys.argv) > 1:
	sys.stdin = open("io/test.in", "r")
	Debug = lambda *args: print('\033[0;31m', *args, '\033[0m', file=sys.stderr)


# Author: Narut Sereewattanawoot
###
def Rd(f=int):
	return [f(x) for x in input().split()]


def JoinF(arr):
	return ' '.join('{:.10f}'.format(x) for x in arr)


###


def main():
	n = int(input())
	S = set(input() for _ in range(n))
	print(len(S))


main()

Submission status: Accepted

Solution code:
# coding: utf-8
import re
import math
from collections import defaultdict
import itertools
from copy import deepcopy
import random
from heapq import heappop,heappush
import time
import os
import queue
import sys
import datetime
from functools import lru_cache
readline=sys.stdin.readline
sys.setrecursionlimit(2000)
#import numpy as np
alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_power(a,b):#aはbの累乗数か
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def get_facs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def floor_(n,x=1):
    return x*(n//x)
def ceil_(n,x=1):
    return x*((n+x-1)//x)
def hani(x,min_,max_):
    ret=x
    if x<min_:ret=min_
    if x>max_:ret=max_
    return ret
def seifu(x):
    return x//abs(x)

###################################################
def main():
    N=int(input())
    S=[]
    for a in range(N):
        S.append(input())
    S=set(S)
    ans=len(S)
    print(ans)
        
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ss = {}
num = 0

for i in range(n):
    s = input()
    if s not in ss:
        ss[s] = "exist"
        num += 1

print(num)

Submission status: Accepted

Solution code:
import sys
from collections import deque
def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    S = set([])
    for _ in range(N):
        S.add(input())
    print(len(S))
    
    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = set()
for i in range(N):
    s.add(input())

print(len(s))

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

Solution code:
n = int(input())
ls = [0] * n
for i in range(n):
    ls[i] = input()
print(len(set(ls)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

item=set([])
for _ in range(n):
    item.add(input())

print(len(list(item)))

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
h = {}
for i in range(N):
	h[rs()] = 1
print(len(h))

Submission status: Accepted

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

print(len(collections.Counter(s)))

Submission status: Accepted

Solution code:
import collections
import math
import operator as op
from functools import reduce
from collections import Counter
import numpy as np
import math
import bisect
import heapq

MOD = 1000000007


def get_inputs(cast_func=None):
    if cast_func is None:
        return input().split()
    else:
        return list(map(cast_func, input().split()))


def get_input(cast_func=None):
    if cast_func is None:
        return input()
    else:
        return cast_func(input())


def main():
    N = get_input(int)
    Ss = set()
    for i in range(N):
        S = get_input()
        Ss.add(S)
    print(len(Ss))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
res = set()
for _ in range(N):
    res.add(input())

print(len(res))

Submission status: Accepted

Solution code:
#c
x = int(input())

line = []

for i in range(0,x):
    line.append(input())

temp = set(line)
print(len(temp))

Submission status: Accepted

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

for _ in range(N):
    S.append(input())

S = list(set(S))

print(len(S))

Submission status: Accepted

Solution code:
N=int(input())
di = {}
for i in range(N):
    s = input()
    di[s] = 0
print(len(di))

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())
S = [input() for _ in range(N)]

d = defaultdict(int)

for s in S:
    d[s] += 1

print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
p = set()
for i in range(n):
  p |= {input()}
print(len(p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    S = set([input() for _ in range(N)])
    print(len(S))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

N = int(input())
S = [input().rstrip() for _ in range(N)]

S = set(S)

print(len(S))

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

N= inputI()
l = inputSLs(N)

print(len(set(l)))

Submission status: Accepted

Solution code:


n = int(input())

s = [ input() for _ in range(n) ]


print(len(set(s)))

Submission status: Accepted

Solution code:
import collections as cl

N = int(input())
S_list = []
for i in range(N) :
    S_list.append(input())

c = cl.Counter(S_list)
print(len(c))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 26 20:57:12 2020

@author: Kanaru Sato
"""

n = int(input())

dic = {}

for i in range(n):
    s = input()
    if s in dic:
        dic[s] += 1
    else:
        dic[s] = 1

print(len(dic))

Submission status: Accepted

Solution code:
def c_gacha():
    from collections import Counter
    N = int(input())
    Prizes = [input() for _ in range(N)]
    return len(Counter(Prizes))

print(c_gacha())

Submission status: Accepted

Solution code:
import collections
n = int(input())
l = list()
for i in range(n):
    l.append(str(input()))
c = collections.Counter(l)
print(len(c))

Submission status: Accepted

Solution code:
N = int(input())
d = set()
for _ in range(N):
    d.add(input())
print(len(d))

Submission status: Accepted

Solution code:
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n
# a, b = list(map(int, input().split()))
# s = input()


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

print(len(s))

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

# If you use recursive call, uncomment this code
#sys.setrecursionlimit(10**6)

def main():
    N = int(input())
    print(len(set([input() for _ in range(N)])))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ls = []
for _ in range(n):
  ls.append(input())
  
print(len(list(set(ls))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def readInt():
    return list(map(int,input().split()))

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

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest


def resolve():
    n = int(input())
    s = [input() for _ in range(n)]

    print(len(set(s)))


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """3
apple
orange
apple"""
        output = """2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """5
grape
grape
grape
grape
grape"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """4
aaaa
a
aaa
aa"""
        output = """4"""
        self.assertIO(input, output)

if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

Solution code:
n = int(input())
k = set()
for i in range(n):
	k.add(input())
print(len(k))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

def solve(N: int, S: "List[str]"):
    print(len(set(S)))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
S = set()

for _ in range(N):
    s = input().strip()
    S.add(s)

print(len(S))

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    N=int(readline())
    d=dict()
    for i in range(N):
        s=readline().strip()
        if s not in d:
            d[s]=1
        else:
            pass
    
    print(len(d))

if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D = {}
for i in range(N):
  s = input()
  if s in D:
    D[s] += 1
  else:
    D[s] = 1
print(len(D))

Submission status: Accepted

Solution code:
_,*a=open(0).read().split()
print(len(set(a)))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    ans = set()
    for _ in range(N):
        s = input().rstrip("\r\n")
        ans.add(s)
    print(len(ans))
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=1
for tt in range(t):
    n=int(input())
    s=set()
    for i in range(n):
        p=str(input())
        s.add(p)
    print(len(s))
    #n,k,s= map(int, sys.stdin.readline().split(' '))
    #a=list(map(int,sys.stdin.readline().split(' ')))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Submission status: Accepted

Solution code:
n = int(input())
ans = set()
for _ in range(n):
    ans.add(input())
print(len(ans))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]

c = Counter(S)
print(len(c.keys()))

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

s = set()

for _ in range(int(input())):
    s.add(input().rstrip())

print(len(s))

Submission status: Accepted

Solution code:
import numpy as np
import math
n = int(input())
d = dict()
for i in range(n):
    s = str(input())
    if s in d:
        continue
    else:
        d[s] = 1
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

# def solve()が@return voidのとき
#solve()

Submission status: Accepted

Solution code:
def examA():
    S, W = LI()
    if S<=W:
        print("unsafe")
    else:
        print("safe")
    return

def examB():
    A, B, C, D = LI()
    while(True):
        C -= B
        if C<=0:
            print("Yes")
            break
        A -= D
        if A<=0:
            print("No")
            break
    return

def examC():
    N = I()
    S = [SI()for _ in range(N)]
    Set = set(S)
    ans = len(Set)
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(readline())
def LI(): return list(map(int,readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examC()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(input() for i in range(n))
ans=set()
for i in range(n):
    ans.add(s[i])

ans=list(ans)
print(len(ans))

Submission status: Accepted

Solution code:
import sys
import math
import collections
from collections import deque
from functools import reduce
import heapq
n = int(input())
#a, b, c, d = map(int, sys.stdin.readline().split())
#s = input()
#a = list(map(int, sys.stdin.readline().split()))

a = []
for i in range(n):
    a.append(input())

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
n=ii()
arr=[]
for i in range(n):
    s=ss()
    arr.append(s)

print(len(list(set(arr))))

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import permutations,combinations
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
# from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint

def myinput():
    return map(int,input().split())

def mylistinput(n):
    return [ list(myinput()) for _ in range(n) ]

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

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

ans = len(list(set(s)))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

d = defaultdict(int)

n = int(input())

for i in range(n):
    key = input()
    d[key] += 1

print(len(d))

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = [input() for i in range(N)]

a =set(S)
print(len(a))

Submission status: Accepted

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from itertools import accumulate, combinations, permutations, product
from math import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
s=[input() for i in range(n)]
# print(s)
lst=list(Counter(s))
print(len(lst))

Submission status: Accepted

Solution code:
n = int(input())
items = {}

for i in range(n):
    items[input()] = True

print(len(items))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    N = int(input())
    s = [input() for _ in range(N)]
    print(len(set(s)))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans=set()
for _ in range(n):
    ans.add(input())
print(len(ans))

Submission status: Accepted

Solution code:
n = int(input())
S = set()
for i in range(n):
    s = str(input())
    S.add(s)
print(len(S))

Submission status: Accepted

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

T = set(S)

print (len(T))

Submission status: Accepted

Solution code:
n = int(input())
s = set()
for _ in range(n):
    S = input()
    s.add(S)
print(len(s))

Submission status: Accepted

Solution code:
n = int(input())
items = set()
for _ in range(n):
    items.add(input())

print(len(items))

Submission status: Accepted

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

s = set(S)
print(len(s))

Submission status: Accepted

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

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

print(len(set(s)))

Submission status: Accepted

Solution code:
from sys import stdin
from sys import setrecursionlimit
import math
setrecursionlimit(10 ** 7)

n = int(stdin.readline().rstrip())
s = [input() for _ in range(n)]
se = set()
for i in s:
    se.add(i)
print(len(se))

Submission status: Accepted

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

for i in range(n):
    s.add(input())
print(len(s))

Submission status: Accepted

Solution code:
import collections
N = int(input())
l = []
for x in range(N):
  s = input()
  l.append(s)
c = collections.Counter(l)
print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(N):
    items.add(str(input()))

print(len(items))

Submission status: Accepted

Solution code:
n=int(input())
li=set()

for i in range(n):
    s=input()
    li.add(s)

print(len(li))

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    d = {}
    for _ in range(int(input())):
        s = input().strip()
        if s in d:
            continue
        d[s] = True
    print(len(d))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A = int(input())
B = set()
for i in range(A):
    B.add(input())
print(len(B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n  = int(input())
s  = set()
for i in range(n):
	tmp = input()
	s.add(tmp)
print(len(s))

Submission status: Accepted

Solution code:
from collections import defaultdict as dict

n = int(input())
d = dict(int)
for i in range(n):
    s = input()
    d[s] += 1
print(len(d))

Submission status: Accepted

Solution code:
n=int(input())
res=set()
for i in range(n):
    res.add(input())
print(len(res))

Submission status: Accepted

Solution code:
N = int(input())

from collections import defaultdict

d = defaultdict(int)

for i in range(N):
    S = input()
    d[S]+=1

print(len(d.keys()))