일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- javascript
- 소프티어
- SQL
- 프로그래머스
- Dynamic Programming
- 티스토리챌린지
- dfs
- 동적계획법
- 자바스크립트
- DP
- 파이썬
- 너비 우선 탐색
- SQL 고득점 KIT
- 깊이 우선 탐색
- 오블완
- 백준
- softeer
- programmers
- Python
- group by
- Lv. 0
- level 3
- LEVEL 2
- bfs
- Lv. 1
- join
- Baekjoon
- Lv. 2
- Lv. 3
- Java
- Today
- Total
목록Python (142)
몸과 마음이 건전한 SW 개발자

문제 링크https://www.acmicpc.net/problem/10830정답 코드import sysinput = sys.stdin.readlinen, b = map(int, input().split())matrix = [list(map(int, input().split())) for _ in range(n)]optimization = dict()# matrix의 원소가 1000이하이기 때문에 처음부터 걸러준다.for i in range(n): for j in range(n): matrix[i][j] %= 1000optimization[1] = matrix# cal = calculationdef cal(leftM, rightM): newM = [[0] * n for _ in ra..

문제 링크https://www.acmicpc.net/problem/12865정답 코드import sysinput = sys.stdin.readlinen, k = map(int, input().split())dp = [[0] * (k+1) for _ in range(n+1)]for i in range(1, n+1): w, v = map(int, input().split()) for j in range(1, k+1): if j >= w: dp[i][j] = max(v+dp[i-1][j-w], dp[i-1][j]) else: dp[i][j] = dp[i-1][j]print(dp[n][k])풀이 방법DP 배열의 의미:dp[i][j]dp[..

문제 링크https://www.codetree.ai/trails/complete/curated-cards/challenge-group-same-word/description Code Tree | Learning to Code with ConfidenceA super-comprehensive, meticulously arranged Coding Learning Curriculum engineered by Algorithm Experts composed of former International Olympiad in Informatics (IOI) medalists.www.codetree.ai정답 코드import sysinput = sys.stdin.readlinen = int(input())words = ..

문제 링크https://www.codetree.ai/trails/complete/curated-cards/challenge-the-sum-of-the-elements-is-0/description Code Tree | Learning to Code with ConfidenceA super-comprehensive, meticulously arranged Coding Learning Curriculum engineered by Algorithm Experts composed of former International Olympiad in Informatics (IOI) medalists.www.codetree.ai내 코드n = int(input())A = list(map(int, input().split(..

문제 링크https://www.codetree.ai/trails/complete/curated-cards/challenge-top-k-frequent-elements/description Code Tree | Learning to Code with ConfidenceA super-comprehensive, meticulously arranged Coding Learning Curriculum engineered by Algorithm Experts composed of former International Olympiad in Informatics (IOI) medalists.www.codetree.ai정답 코드n, k = map(int, input().split())arr = list(map(int, ..

문제 링크https://www.codetree.ai/trails/complete/curated-cards/challenge-sum-of-three-num/description Code Tree | Learning to Code with ConfidenceA super-comprehensive, meticulously arranged Coding Learning Curriculum engineered by Algorithm Experts composed of former International Olympiad in Informatics (IOI) medalists.www.codetree.ai내 코드n, k = map(int, input().split())arr = list(map(int, input()...