From 608304fcfee9c333dc395a9e97e830be087848b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=8B=A0=EC=A7=80?= <101992179+ksinji@users.noreply.github.com> Date: Thu, 12 Feb 2026 23:34:52 +0900 Subject: [PATCH] =?UTF-8?q?[20260212]=20PGM=20/=20LV3=20/=20=EC=8A=A4?= =?UTF-8?q?=ED=8B=B0=EC=BB=A4=EB=AA=A8=EC=9C=BC=EA=B8=B0(2)=20/=20?= =?UTF-8?q?=EA=B0=95=EC=8B=A0=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...353\252\250\354\234\274\352\270\260(2).md" | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 "ksinji/202602/12 PGM \354\212\244\355\213\260\354\273\244\353\252\250\354\234\274\352\270\260(2).md" diff --git "a/ksinji/202602/12 PGM \354\212\244\355\213\260\354\273\244\353\252\250\354\234\274\352\270\260(2).md" "b/ksinji/202602/12 PGM \354\212\244\355\213\260\354\273\244\353\252\250\354\234\274\352\270\260(2).md" new file mode 100644 index 00000000..fa77f08d --- /dev/null +++ "b/ksinji/202602/12 PGM \354\212\244\355\213\260\354\273\244\353\252\250\354\234\274\352\270\260(2).md" @@ -0,0 +1,32 @@ +```java +class Solution { + public int solution(int sticker[]) { + int n = sticker.length; + + if (n == 1) { + return sticker[0]; + } + if (n == 2) { + return Math.max(sticker[0], sticker[1]); + } + + int first[] = new int[n]; + first[0] = sticker[0]; + first[1] = sticker[0]; + + for (int i=2; i