분류 전체보기 249

백준 2630 C++ (분할과 정복)

#define _CRT_SECURE_NO_WARNINGS #include using namespace std; #define pb push_back #define ss stable_sort #define ll long long int paper[128][128]; int white , blue; void Devide(int x, int y, int s) { //분할 함수 int color = paper[x][y]; //왼쪽 모서리 색깔저장 for (int i = x; i < x + s; i++) { for (int j = y; j < y + s; j++) { //사이즈내를 돌면서 if (color == 0 && paper[i][j]==1) { color = 2; } else if (color == 1 &..

백준 풀이 C++ 2022.09.24