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 | 29 |
30 | 31 |
Tags
- 평범한 배낭
- 미로탐색
- LCS2
- python
- 소수찾기
- 파이썬
- 대소비교
- 가장 긴 증가하는 부분수열
- 8-queen
- BFS
- BOJ 2606
- 프로그래머스
- 백준_2178
- 백준
- 리스트
- 백준 9252
- 타겟 넘버
- 백준 2606
- boj 11053
- 데카르트 곱
- 백준 12015
- 2606
- 증가하는 부분수열 2
- 냅색
- dfs
- 알고리즘
- 백준 1535
- 12865
- 9663
- list
Archives
- Today
- Total
목록boj 11053 (1)
Devlog_by_0giru

N = int(input()) array = list(map(int, input().split())) dp = [1 for i in range(N)] temp_list = list() for i in range(N): for j in range(i): if array[i] > array[j]: temp_list.append(dp[j]+1) temp = max(temp_list) dp[i] = temp temp_list.clear() print(max(dp)) for i in range(N): for j in range(i): if array[i] > array[j] and dp[j] + 1 > dp[i]: dp[i] = dp[j] + 1 print(max(dp)) 두 코드 모두 맞는 코드이고 동일하게 아..
[PS]
2021. 2. 24. 14:22