diff --git a/src/week3/BOJ15684/BOJ15684_V1.cpp b/src/week3/BOJ15684/BOJ15684_V1.cpp new file mode 100644 index 0000000..92a7aa7 --- /dev/null +++ b/src/week3/BOJ15684/BOJ15684_V1.cpp @@ -0,0 +1,56 @@ +#include +using namespace std; +int N, H, M; +int visited[31][11]; +int ret = INT_MAX; +bool check() { + for (int i=1; i 3 || cnt >= ret) + return; + + if (check()) { + ret = min(ret, cnt); + return; + } + + for (int i=here; i<=H; i++) { + for (int j=1; j> N >> M >> H; + + for (int i=0; i> y >> x; + visited[y][x] = 1; + } + solve(1, 0); + if (ret == INT_MAX) + cout << -1 << '\n'; + else + cout << ret << '\n'; + return 0; +} \ No newline at end of file