๋ฌธ์
https://www.acmicpc.net/problem/11722
ํ์ด
# ๋ฐฑ์ค 11722๋ฒ ๋ฌธ์ - ๊ฐ์ฅ ๊ธด ๊ฐ์ํ๋ ๋ถ๋ถ์์ด
n = int(input())
arr = list(map(int, input().split()))
dp = [1] * n
for i in range(n):
for j in range(1, i):
if arr[i] < arr[j]:
dp[i] = max(dp[i], dp[j]+1)
print(max(dp))
'๐๏ธ Algorithm > ๐ฉ ๋ฐฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐ฉ [๋ฐฑ์ค] [Python] [Gold4] 9935๋ฒ_๋ฌธ์์ด ํญ๋ฐ (0) | 2023.04.03 |
---|---|
๐ฉ [๋ฐฑ์ค] [Python] [Gold4] 1806๋ฒ_๋ถ๋ถํฉ (0) | 2023.04.01 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold4] 2636๋ฒ_์น์ฆ (0) | 2023.03.31 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold4] 1744๋ฒ_์ ๋ฌถ๊ธฐ (0) | 2023.03.31 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold2] 1202๋ฒ_๋ณด์ ๋๋ (0) | 2023.03.30 |