From 20365a4ee7f1717dc4c21211582e1f53adb73421 Mon Sep 17 00:00:00 2001 From: sh0723 Date: Mon, 31 Aug 2026 18:00:21 +0900 Subject: [PATCH] =?UTF-8?q?17822=20:=20=EC=9B=90=ED=8C=90=20=EB=8F=8C?= =?UTF-8?q?=EB=A6=AC=EA=B8=B0=20solve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week5/BOJ17822/BOJ17822_V1.cpp | 114 +++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 src/week5/BOJ17822/BOJ17822_V1.cpp diff --git a/src/week5/BOJ17822/BOJ17822_V1.cpp b/src/week5/BOJ17822/BOJ17822_V1.cpp new file mode 100644 index 0000000..f5eb229 --- /dev/null +++ b/src/week5/BOJ17822/BOJ17822_V1.cpp @@ -0,0 +1,114 @@ +#include +using namespace std; +int N,M,T; +int circle[51][51]; +bool find_target[51][51]; +void rotate_circle(int idx, int how, int dir) { + int temp[51]; + if (dir == 0) { + for (int i=0; i> N >> M >> T; + + for (int i=0; i> circle[i][j]; + } + } + + + for (int i=0; i> x >> d >> k; + for (int j=1; j<=N; j++) { + if (j%x == 0) + rotate_circle(j-1,k,d); + } + + bool is_find = false; + + for (int j=1; j circle[j][l] * cnt) { + circle[j][l] += 1; + } else if (sum < circle[j][l] * cnt) { + circle[j][l] -= 1; + } + } + } + } else { + for (int j=0; j