백준 1764번 - 듣보잡 [Python]
문제 링크 : https://www.acmicpc.net/problem/1764풀이 과정먼저, 듣도 못한 사람의 명단을 Dictionary 에 저장한다.그 다음, 보도 못한 사람이 Dictionary 에 존재한다면 정답 배열에 넣는다.정답 배열 요소들을 사전순으로 출력한다.전체 코드# 1764 : 듣보잡import sysinput = sys.stdin.readlinen, m = map(int, input().rstrip().split())dic = {}for _ in range(n): string = input().rstrip() dic[string] = 1ans = []for _ in range(m): string = input().rstrip() if dic.get(string..
Problem Solving/BOJ
2025. 10. 17. 10:17
백준 1620번 - 나는야 포켓몬 마스터 이다솜 [Python]
문제 링크 : https://www.acmicpc.net/problem/1620풀이 과정파이썬의 Dictionary 자료형을 사용해 풀이했다.전체 코드# 1620 : 나는야 포켓몬 마스터 이다솜import sysinput = sys.stdin.readlinen, m = map(int, input().rstrip().split())poke = {}for i in range(1, n+1): string = input().rstrip() poke[string] = str(i) poke[str(i)] = stringfor _ in range(m): string = input().rstrip() print(poke[string])
Problem Solving/BOJ
2025. 10. 17. 10:14
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Python
- kmp
- implementation
- BOJ
- segment-tree
- backtracking
- string
- lazy-propagation
- knapsack
- C++
- DP
- sparse_table
- lca
- bitmask
- BFS
- java
- bruteforcing
- C
- codeup
- Binary-Search
- stack
- PS
- Sort
- ad_hoc
- queue
- Greedy
- number_theory
- math
- 백준
- Prefix-Sum
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함
