Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 서브쿼리
- 그리디
- 자료구조
- 해시
- 그래프 이론
- DP
- 시뮬레이션
- 구현
- GROUP BY
- 누적합
- 브루트포스
- 우선순위큐
- 다이나믹 프로그래밍
- 분할정복
- 백트래킹
- join
- 다시
- 다이나믹프로그래밍
- 에라토스테네스의 체
- BFS
- 투포인터
- 그래프 탐색
- 플로이드-워셜
- 재귀
- DFS
- 다익스트라
- 트리
- 크루스칼
- 수학
- MST
Archives
- Today
- Total
기록하고 까먹지 말기
1269 본문
날짜 : 2022. 09. 13
사용 언어 : python
문제
코드
import sys
m, n = map(int, sys.stdin.readline().split()) # A와 B의 원소의 개수 입력
same = list()
a = dict()
b = dict()
temp_a = map(int, sys.stdin.readline().split())
temp_b = map(int, sys.stdin.readline().split())
for i in temp_a:
a[int(i)] = 1
for i in temp_b:
b[int(i)] = 1
if int(i) in a:
same.append(int(i))
print(len(a)+len(b)-len(same)*2)
(set 없이 문제 해결)
알게된 점
참고 사이트
-