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