일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- dfs
- 그래프 이론
- LCS 알고리즘
- Docker 원리
- 모듈러 연산 분배법칙
- 파이썬
- 최장공통부분문자열
- 다이나믹 프로그래밍
- 문자열
- 수학
- 냅색 알고리즘
- 일단 시도
- 배낭 문제
- Container vs VM
- bfs
- 최장공통부분수열
- 나는 바보야...
- 너비 우선 탐색
- Python
- error:0308010C:digital envelope routines::unsupported
- 깊이 우선 탐색
- 동적 계획법
- npm start
- 그래프탐색
- 구현
- db replication
- 정처기 필기
- lazy evaluation
- 클래스
- 그래프 탐색
Archives
- Today
- Total
목록이분 탐색 (1)
Save my data
백준 10815 : 숫자 카드 (파이썬)
기초적인 이분 탐색 문제였다. 이분 탐색은 리스트가 정렬되어 있을 때 사용할 수 있는 탐색의 한 종류이다. import sys sys.stdin = open("10815.txt", 'r') N = int(sys.stdin.readline()) n = [*map(int, sys.stdin.readline().split())] M = int(sys.stdin.readline()) m = [*map(int, sys.stdin.readline().split())] n.sort() for i in m: start = 0 end = N - 1 mid = (start + end) // 2 while start n[mid]: start = mid + 1 mid = (start + end) // 2 else: print..
알고리즘 & SQL/백준
2023. 2. 20. 23:01