From ff412e8fe35f1fc7264af417eb50e912f8fb9dc6 Mon Sep 17 00:00:00 2001 From: sh0723 Date: Tue, 1 Sep 2026 18:14:35 +0900 Subject: [PATCH 1/2] =?UTF-8?q?7795=20:=20=EB=A8=B9=EC=9D=84=20=EA=B2=83?= =?UTF-8?q?=EC=9D=B8=EA=B0=80=20=EB=A8=B9=ED=9E=90=20=EA=B2=83=EC=9D=B8?= =?UTF-8?q?=EA=B0=80=20solve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week6/BOJ7795/BOJ7795_V1.cpp | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/week6/BOJ7795/BOJ7795_V1.cpp diff --git a/src/week6/BOJ7795/BOJ7795_V1.cpp b/src/week6/BOJ7795/BOJ7795_V1.cpp new file mode 100644 index 0000000..a1331e2 --- /dev/null +++ b/src/week6/BOJ7795/BOJ7795_V1.cpp @@ -0,0 +1,56 @@ +#include +using namespace std; +int T; +vector ret; +int main() { + + ios_base::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); + + cin >> T; + + for (int i=0; i> N >> M; + vector A,B; + for (int j=0; j> temp; + A.push_back(temp); + } + for (int j=0; j> temp; + B.push_back(temp); + } + + sort(A.begin(), A.end()); + sort(B.begin(), B.end()); + + int prev_high=0; + int cnt=0; + for (int j=0; j Date: Tue, 1 Sep 2026 18:19:27 +0900 Subject: [PATCH 2/2] =?UTF-8?q?7795=20:=20=EB=A8=B9=EC=9D=84=20=EA=B2=83?= =?UTF-8?q?=EC=9D=B8=EA=B0=80=20=EB=A8=B9=ED=9E=90=20=EA=B2=83=EC=9D=B8?= =?UTF-8?q?=EA=B0=80=20v2=20solve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week6/BOJ7795/BOJ7795_V2.cpp | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/week6/BOJ7795/BOJ7795_V2.cpp diff --git a/src/week6/BOJ7795/BOJ7795_V2.cpp b/src/week6/BOJ7795/BOJ7795_V2.cpp new file mode 100644 index 0000000..2f9a927 --- /dev/null +++ b/src/week6/BOJ7795/BOJ7795_V2.cpp @@ -0,0 +1,46 @@ +#include +using namespace std; +int T; +vector ret; +int main() { + + ios_base::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); + + cin >> T; + + for (int i=0; i> N >> M; + vector A,B; + for (int j=0; j> temp; + A.push_back(temp); + } + for (int j=0; j> temp; + B.push_back(temp); + } + + sort(A.begin(), A.end()); + sort(B.begin(), B.end()); + int ret_num=0; + for (int j=0; j