20250831 baekjoon

This commit is contained in:
songyc macbook 2025-08-31 18:35:18 +09:00
parent 1ef04d3377
commit d6a492a687
4 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,7 @@
s = input().rstrip()
substr = set()
for i in range(len(s)) :
for j in range(len(s)-i) :
substr.add(s[i:i+j+1])
print(len(substr))

View File

@ -0,0 +1,8 @@
import sys
input = sys.stdin.readline
input()
A = set(map(int,input().split()))
B = set(map(int,input().split()))
print(len(A-B) + len(B-A))

View File

@ -0,0 +1,15 @@
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
hashMap = dict()
for _ in range(N) :
hashMap[input().rstrip()] = 1
count = 0
for _ in range(M) :
if input().rstrip() in hashMap :
count += 1
print(count)

View File

@ -0,0 +1,14 @@
import sys
input = sys.stdin.readline
log = dict()
for _ in range(int(input())) :
name, state = input().rstrip().split()
log[name] = state
person = []
for key in log :
if log[key] == "enter" :
person.append(key)
print('\n'.join(sorted(person, reverse=True)))