From c8410b82dad30c90d966db71256dd8518748ceac Mon Sep 17 00:00:00 2001 From: sh0723 Date: Fri, 3 Jul 2026 15:25:29 +0900 Subject: [PATCH 1/2] =?UTF-8?q?15926=20:=20=ED=98=84=EC=9A=B1=EC=9D=80=20?= =?UTF-8?q?=EA=B4=84=ED=98=B8=EC=99=95=EC=9D=B4=EC=95=BCgit=20add=20.=20so?= =?UTF-8?q?lve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week4/BOJ15926/BOJ15926_V1.cpp | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/week4/BOJ15926/BOJ15926_V1.cpp diff --git a/src/week4/BOJ15926/BOJ15926_V1.cpp b/src/week4/BOJ15926/BOJ15926_V1.cpp new file mode 100644 index 0000000..5f3ca61 --- /dev/null +++ b/src/week4/BOJ15926/BOJ15926_V1.cpp @@ -0,0 +1,35 @@ +#include +using namespace std; +bool flag[200000]; +int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + cout.tie(NULL); + string s; + int n; + cin >> n >> s; + stack stk; + for (int i=0; i Date: Fri, 3 Jul 2026 15:30:10 +0900 Subject: [PATCH 2/2] =?UTF-8?q?15926=20:=20=ED=98=84=EC=9A=B1=EC=9D=80=20?= =?UTF-8?q?=EA=B4=84=ED=98=B8=EC=99=95=EC=9D=B4=EC=95=BCgit=20add=20.=20v2?= =?UTF-8?q?=20solve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week4/BOJ15926/BOJ15926_V2.cpp | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/week4/BOJ15926/BOJ15926_V2.cpp diff --git a/src/week4/BOJ15926/BOJ15926_V2.cpp b/src/week4/BOJ15926/BOJ15926_V2.cpp new file mode 100644 index 0000000..fcefee6 --- /dev/null +++ b/src/week4/BOJ15926/BOJ15926_V2.cpp @@ -0,0 +1,31 @@ +#include +using namespace std; + +int main() { + + ios::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); + + int n; + string s; + cin >> n >> s; + stack stk; + stk.push(-1); + int ret = 0; + for (int i=0; i