[BAEKJOON] 1074번: Z
1074번 문제이다. 사진을 누르면 문제로 이동한다. 문제는 C++언어로 구현하였다. #include using namespace std; int n, r, c; int ans; void Z(int y, int x, int size) { if (y == r && x == c) { cout = x) { // 1사분면 탐색 Z(y, x, size / 2); // 2사분면 탐색 Z(y, x + size / 2, size / 2); // 3사분면 탐색 Z(y + size / 2, x, size / 2); // 4사분면 탐색 Z(y + size / 2, x + size / 2, size / 2); } else { ans += size * size; } } int main() { ios_base::sync_with..
2021. 9. 27.