From 2d2a9bb2ef2bda13e465149b174a0ef9e93c71c1 Mon Sep 17 00:00:00 2001 From: Yoonseo Kim Date: Sat, 12 Mar 2022 23:32:21 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=80=EC=9E=A5=20=EA=B8=B4=20=EA=B0=90?= =?UTF-8?q?=EC=86=8C=ED=95=98=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=88=98?= =?UTF-8?q?=EC=97=B4(#7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Algorithm/BOJ/11722.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Algorithm/BOJ/11722.py diff --git a/Algorithm/BOJ/11722.py b/Algorithm/BOJ/11722.py new file mode 100644 index 0000000..6126720 --- /dev/null +++ b/Algorithm/BOJ/11722.py @@ -0,0 +1,11 @@ +n = int(input()) +array = list(map(int, input().split())) + +dp = [1] * (n+1) + +for i in range(n): + for j in range(i): + if array[i] < array[j]: + dp[i] = max(dp[i], dp[j]+1) + +print(max(dp)) \ No newline at end of file