From 84a1ff9a605401ac60b8beea0cfcbde7d3ea8cc6 Mon Sep 17 00:00:00 2001 From: sh0723 Date: Tue, 15 Sep 2026 15:07:52 +0900 Subject: [PATCH 1/2] =?UTF-8?q?11053=20:=20=EA=B0=80=EC=9E=A5=20=EA=B8=B4?= =?UTF-8?q?=20=EC=A6=9D=EA=B0=80=ED=95=98=EB=8A=94=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=88=98=EC=97=B4=20solve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week6/BOJ11053/BOJ11053_V1.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/week6/BOJ11053/BOJ11053_V1.cpp diff --git a/src/week6/BOJ11053/BOJ11053_V1.cpp b/src/week6/BOJ11053/BOJ11053_V1.cpp new file mode 100644 index 0000000..1c599c4 --- /dev/null +++ b/src/week6/BOJ11053/BOJ11053_V1.cpp @@ -0,0 +1,28 @@ +#include +using namespace std; +vector lis; +int main() { + + ios_base::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); + + int N; + cin >> N; + + for (int i=0; i> num; + auto _pos = lower_bound(lis.begin(),lis.end(), num); + if (_pos == lis.end()) { + lis.push_back(num); + } else { + *_pos = num; + } + } + + cout << lis.size(); + + + return 0; +} \ No newline at end of file From e18e44f91404c027134e03800ad876a215505ca7 Mon Sep 17 00:00:00 2001 From: sh0723 Date: Tue, 15 Sep 2026 15:13:12 +0900 Subject: [PATCH 2/2] =?UTF-8?q?11053=20:=20=EA=B0=80=EC=9E=A5=20=EA=B8=B4?= =?UTF-8?q?=20=EC=A6=9D=EA=B0=80=ED=95=98=EB=8A=94=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=88=98=EC=97=B4=20=EC=B6=9C=EB=A0=A5=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week6/BOJ11053/BOJ11053_V1.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/week6/BOJ11053/BOJ11053_V1.cpp b/src/week6/BOJ11053/BOJ11053_V1.cpp index 1c599c4..f2d96f4 100644 --- a/src/week6/BOJ11053/BOJ11053_V1.cpp +++ b/src/week6/BOJ11053/BOJ11053_V1.cpp @@ -21,8 +21,8 @@ int main() { } } - cout << lis.size(); + cout << lis.size() << '\n'; return 0; -} \ No newline at end of file +}