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 |
Tags
- spring cloud
- 파이썬
- Spring
- 백준 16719
- re.split
- springboot
- 프로그래머스
- spring oauth
- 웹어플리케이션 서버
- 백준 파이썬
- Coroutine
- 백준 17779
- 프로래머스
- java
- JVM
- 백준 16235
- Spring Boot
- 백준 16236
- with recursive
- spring security
- sql 기술면접
- 백준 19238
- JPA
- MSA
- MySQL
- 백준 15685
- 백준 17626
- Kotlin
- java 기술면접
- 백준
Archives
- Today
- Total
목록백준 11053 (1)
시작이 반
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bX0p1M/btqYrFjUspw/ImD55k0n5pvmUHwmwBgNw0/img.png)
수열중 가장 긴 증가하는 부분 수열을 구하는 문제 dp[i] = (a[i] > a[0:i-1]보다 작은 값들 중) max( dp[0 : i-1] ) + 1 n = int(input()) a = list(map(int, input().split())) dp = [0] * n def longIncSequence(): dp[0] = 1 for i in range(1, n): max_value = 0 for j in range(i): if a[i] > a[j]: max_value = max(max_value, dp[j]) dp[i] = max_value + 1 longIncSequence() print(max(dp))
알고리즘/백준
2021. 2. 24. 18:56