일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- select
- join
- Lv. 3
- 깊이 우선 탐색
- javascript
- programmers
- level 3
- Lv. 2
- softeer
- 소프티어
- 티스토리챌린지
- LEVEL 2
- SQL
- 오블완
- 자바스크립트
- bfs
- DP
- group by
- SQL 고득점 KIT
- dfs
- Dynamic Programming
- 프로그래머스
- 파이썬
- Lv. 0
- 동적계획법
- C언어
- Python
- 너비 우선 탐색
- Lv. 1
- Java
- Today
- Total
목록Python (135)
몸과 마음이 건전한 SW 개발자
문제 링크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()...
문제 링크https://www.codetree.ai/missions/8/problems/shortest-subtotal/submissions 코드트리 | 코딩테스트 준비를 위한 알고리즘 정석국가대표가 만든 코딩 공부의 가이드북 코딩 왕초보부터 꿈의 직장 코테 합격까지, 국가대표가 엄선한 커리큘럼으로 준비해보세요.www.codetree.ai내 코드n, k = map(int, input().split())nums = list(map(int, input().split()))tot = nums[0]answer = 100000r = 0for l in range(n): while r + 1 = k: answer = min(answer, r - l + 1) tot -= nums[l]if ans..