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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


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


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:
def main():
    n = int(input())
    s = [None] * n
    for i in range(n):
        s[i] = input()

    gained = set()
    for x in s:
        gained.add(x)

    print(len(gained))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

set_ = set(s)
print(len(set_))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

B = [input() for i in range(n)]

print(len(set(B)))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline
import collections


def main():
    N = int(input())
    S = [input().strip() for _ in range(N)]
    c = collections.Counter(S)
    print(len(c))


    
    
    
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    S = set()
    for _ in range(N):
        S |= {input().strip("\n")}
    print(len(S))

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = {}
    for _ in range(N):
        S[input()] = 1

    return len(S)

print(main())

Submission status: Accepted

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

Submission status: Accepted

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

print(len(ans))

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

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

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:
def main():
    n = int(input())
    s = [input() for _ in range(n)]
    print(len(set(s)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
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 fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    ans=set()
    for i in range(N):
        ans.add(ST())
    print(len(ans))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
n=int(input())
#n,k=list(map(int,input().split()))
ans=defaultdict(int)
for i in range(n):
    s=input()
    ans[s]+=1

print(len(ans.keys()))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


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:
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:
N = int(input())
A = []
for i in range(N):
    A.append(input())
A = set(A)
print(len(A))

Submission status: Accepted

Solution code:
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  l=[S() for _ in range(n)]
  return len(set(l))

# main()
print(main())

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import lru_cache, reduce
from math import gcd
from operator import add, itemgetter, mul, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


N = int(sys.stdin.buffer.readline())
S = [sys.stdin.buffer.readline().decode().rstrip() for _ in range(N)]

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

Submission status: Accepted

Solution code:
from sys import stdin
from sys import setrecursionlimit
from collections import Counter, deque, defaultdict
from bisect import bisect_left
setrecursionlimit(1000000)

INF = int(1e10)
MOD = int(1e9 + 7)

def input():
    return stdin.readline()[:-1]


def main():
    from builtins import int, map
    n = int(input())
    count = defaultdict(int)
    for _ in range(n):
        s = input()
        count[s] += 1
    print(len(count))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]
def I(): return int(sys.stdin.buffer.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    d = dict(zip([input() for i in range(n)],range(n)))
    print(len(d))
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n=int(input())
arr=[input() for _ in range(n)]
cnt=collections.Counter(arr)
print(len(cnt.keys()))

Submission status: Accepted

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

t=set(S)
print(len(t))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


def solve():
    N = Scanner.int()
    M = set()
    for _ in range(N):
        S = Scanner.string()
        M.add(S)
    print(len(M))


def main():
    # sys.stdin = open("sample.txt")
    solve()


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

f_lists = []

for i in range(N):
    tmp = input()
    f_lists.append(tmp)

ans = len(set(f_lists))
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
s=set(input() for _ in range(n))
print(len(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:
# -*- coding: utf-8 -*-

N=int(input())

ans=dict()
for i in range(N):
    S=input()
    if not S in ans:
        ans[S]=1

print(len(ans))

Submission status: Accepted

Solution code:
N = int(input())

slist = [input() for i in range(N)]

sdict = {}

for s in slist:
    sdict[s] = 1

print(len(sdict))

Submission status: Accepted

Solution code:

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    from collections import defaultdict
    dd = defaultdict(int)
    for i in range(N):
        S=input()
        dd[S]+=1
    
    ans=0
    for k,v in dd.items():
        ans+=1
        
    print(ans)

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())
l = [input() for i in range(N)]

l_set = set(l)

print(len(l_set))

Submission status: Accepted

Solution code:
def main():
    import sys
    from collections import Counter

    input = sys.stdin.readline

    n = int(input())
    s = [str(input()) for i in range(n)]
    co = Counter(s)
    print(len(co))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter


def read():
    N = int(input())
    S = []
    for i in range(N):
        s = input()
        S.append(s)
    return N, S

def solve(N, S):
    return len(Counter(S))


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("{}".format(outputs))

Submission status: Accepted

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

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:
n=int(input())
print(len(set(input() for i in range(n))))

Submission status: Accepted

Solution code:
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    N = int(input())
    print(len(set(input() for i in range(N))))

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

print(len(set(S)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    A = set()
    for _ in range(N):
        S = input().rstrip('\n')
        A.add(S)
    print(len(A))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

if __name__ == '__main__':
    N = int(input())
    S = [sys.stdin.readline() for _ in range(N)]

    print(len(set(S)))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from math import gcd


N = read_a_int()
mono = []
for _ in range(N):
    mono.append(read()[:-1])

print(len(set(mono)))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
#!python3

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


def main():
    s = set()
    for x in S:
        s.add(x)
    
    ans = len(s)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import time
import math
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
N=int(input())
print(len(Counter([input() for i in range(N)])))

Submission status: Runtime Error

Solution code:
N = int(input())
count = 0
for _ in range(N):
    s = input()
    if not s in lst:
        count += 1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
b=0

for i in range(0,N):
    S[i]=input()

b=collections.Counter(S)
print(len(S))

Submission status: Runtime Error

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

print(len(set(S))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    vector<string> S(N);
    for(int i=0;i<N;i++) {
        cin >> S.at(i);
    }
    sort(S.begin(),S.end());
    S.erase(unique(S.begin(),S.end()),S.end());
    cout << (int)S.size() << endl;
}

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<bits/stdc++.h>
using namespace std;

#define ll                 long long
#define mod                1000000007
#define pb                 push_back
#define vecsort(v)         sort(v.begin(),v.end())
#define lcm(x,y)           (x/__gcd(x,y))*y
#define forn(i,n)          for(i = 0 ; i < n ; i++)
#define deb(x)             cout << #x << " " << x << endl;
#define T(t)               cout << "Case " << t <<": ";
#define scan(v)            for(int i = 0; i<n; i++){ll x;cin>>x;v.pb(x);}
#define fast_cin           ios_base::sync_with_stdio(false);cin.tie(NULL);



int main() {
     
       #ifndef ONLINE_JUDGE
       //freopen("read.txt","r",stdin);
      // freopen("write.txt","w",stdout);
       #endif

       set < string > S;

       ll n ;
       cin >> n ;
       for( int i = 0 ; i < n ; i++ ){
              string s;
              cin >> s;
              S.insert(s);
       }
       cout << S.size() << endl;





       return 0;

}

Submission status: Runtime Error

Solution code:
n = int(input())
s = [0]*n
for i in range(n):
    s[i]= input()
    new_s = sorted(s)
def count():
    k = []
    cnt = 0
    for i in range(n):
        if not s[i] in k:
            cnt += 1
            k.append(s[i])
    return cnt
    
r = count()
print(r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(len(set(S)))

Submission status: Runtime Error

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

for i in s:
    ans.add(i)

print(len(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=set()
for i in range(n):
    p=input()
    x=p in s
    if x==False:
    s.add(k)
print(len(s))

Submission status: Runtime Error

Solution code:
n=int(input())
s=set()
for i in range(n):
    p=input()
    x=p in l
    if x==False:
    s.add(k)
print(len(s))

Submission status: Runtime Error

Solution code:
n=int(input())
s=set()
for i in range(n):
    p=input()
    x=p in l
    if x==False:
    s.add(k)
print(len(l))

Submission status: Runtime Error

Solution code:
Row = int(input())
List = []
for i in range (Row):
  List.append(int(input()))
s_l = set(List)
print(len(s_l))

Submission status: Runtime Error

Solution code:
f = open('C/C.txt','r')
sys.stdin = f

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

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

Submission status: Runtime Error

Solution code:
n=int(input())
d={}
for i in range(n):
    s=str(input())
    d.add(s)
print(len(d))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
num = int(input())
list = []
count = 0
flag = 0

for i in range(num):
  cha = input()
  for j in range(i):
    if (list[j] == list[i]):
      flag = 1
  if(flag == 0):
    count += 1
  elif(flag == 1):
    flag = 0

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
try:
  s = set(map(int,input().split()))
except:
  s = set(map(str,input().split()))
a = len(s)
print(a)

Submission status: Runtime Error

Solution code:
n = int(input())
s = list(map(int,input().split()))
s = set(s)
a = len(s)
print(a)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C_fix
# CreatedDate:  2020-06-27 13:14:18 +0900
# LastModified: 2020-06-27 13:50:05 +0900
#


def main():
    n, m = map(int, input().split())
    h = list(map(int, input().split()))
    ma = [0]*n
    for _ in range(m):
        a, b = map(int, input().split())
        ma[a-1] = max(ma[a-1], h[b-1])
        ma[b-1] = max(ma[b-1], h[a-1])
#        print(ma)
    cnt = 0
    for i in range(n):
        if ma[i] < h[i]:
            cnt += 1
    print(cnt)




if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
n=int(input())
lst={}
 for i in range(n):
    lst[str(input())]+=1
print(len(lst))

Submission status: Runtime Error

Solution code:
n=int(input())
lst={}
for i in range(n):
 lst.extend(input().split())
list_uniq={}
ans=0
for j in lst:
 if list_uniq.count(j)==0:
    list_uniq.append(j)
    ans+=1
 else:
    pass
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
lst=[]
for i in range(n)
 lst.extend(str(input()))
 
 
list_uniq=[]
for j in lst
 if list_uniq.count(j)==0:
    list_uniq.extend(j)
 else:
    pass
 print(len(list_uniq))

Submission status: Runtime Error

Solution code:
n=int(input())
lst=[]
for i in range(n)
 lst.extend(str(input()))


list_uniq=[]
for j in lst
 if list_uniq.count(j)==0:
    list_uniq.extend(j)
 else:
    pass
 print(len(list_uniq))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

n = int(input())

strs = [input() for _ in range(n)]
buff = ['A']
print(strs, buff)
for word in strs:
    flag = 0
    
    for bum in buff:
        print(word, bum)
        if word == bum:
            flag = 1
        
    if flag != 1:
        buff.append(word)
    print(strs, buff)

print(len(buff)-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n= int(input())
l= {}
for _ in range(n):
	s= input()
	l.add(s)
print(len(l))

Submission status: Runtime Error

Solution code:
N = int(input())
biki = {}
for i in range(N):
    S = input()
    biki.append(S)
print(len(biki))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(N):
  if !(S[i] in S):
    cnt+=1:
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
li = list()
for i range(n):
	li.append(str(input()))

print(len(set(li)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
n = int(input())
count = 0

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

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
list = list(input() for i in range(N))
print(len(set(list)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
for i in range(N):
  i = input()
print(len(set(i)))

Submission status: Runtime Error

Solution code:
N = int(input())
st = set()
for _ in range(N):
  S = input()
  st.insert(S)

print(len(st))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
using Graph = vector<VecP>;
#define REP(i, m, n) for(ll (i) = (m); (i) < (n); ++(i))
#define REPR(i, m, n) for(ll (i) = (m); (i) > (n); --(i))
#define rep(i, n) REP(i, 0, n)
#define R cin>>
#define repr(i, n) REPR(i, n, 0)
#define all(s) (s).begin(), (s).end()
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define in(a) insert(a)
#define P(p) cout<<(p)<<endl;
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define SORT(a) sort((a).begin(), (a).end())
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long int> vll;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
typedef pair<ll, ll> pll;
void sonic(){ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);}
void setp(const ll n){cout << fixed << setprecision(n);}
const ll INF = 1e9+1;
const ll LINF = 1e18+1;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const ld PI = acos(-1);
const ld EPS = 1e-11;
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
template<typename T> void co(T e){cout << e << "\n";}
template<typename T> void co(const vector<T>& v){for(const auto& e : v)
    { cout << e << " "; } cout << "\n";}
ll gcd(ll a, ll b) {
    if (a < b)swap(a, b);
    if (b == 0) return a;
    unsigned r;
    while ((r = a % b)) {
        a = b;
        b = r;
    }
    return b;
}
ll lcm(ll a, ll b) {
    ll g = gcd(a, b);
    return a * b / g;
}
bool prime(ll n) {
    for (ll i = 2; i <= sqrt(n); i++) {
        if (n%i == 0)return false;
    }
    return n != 1;
}

Vec fac, finv;

ll PowMod(ll a, ll n){
    if(n == 1) return a;
    if(n%2 == 0) return PowMod(a*a%MOD, n/2);
    return a*PowMod(a*a%MOD, n/2)%MOD;
}

ll combi(ll n, ll k){
    if(k>n) return 0;
    return fac[n]*finv[k]%MOD*finv[n-k]%MOD;
}

int main(){
    int ans = 0, n;
    R n;
    set<string>s;
    rep(i, n){
        string ss;
        R ss;
        s.insert(ss);
    }
    co(s.size());
}

Submission status: Runtime Error

Solution code:
n=int(input())
li=[]
for si in n:
    si=input()
    li.append(si)
print(len(set(li)))