백준_1012_유기농 배추
맞은 정답 // c++ 쓰기 #include #include using namespace std; int testcase; int m, n, k; // 가로길이, 세로길이, 배추 개수 int arr[51][51] = { 0, }; int cnt = 0; // 배추 갯수 int result; int x_offset[4] = { 0,0,-1,1 }; // 상 하 좌 우 int y_offset[4] = { 1,-1,0,0 }; void func(int x, int y); int main(void) { cin >> testcase; for (int i = 0; i > m >> n >> k; for (int j = 0; j < k; j++) { int x, y; cin ..
2018. 7. 19.
백준_2468_안전 영역
// c++ 쓰기 #include #include using namespace std; int n; // 행 열 갯수 int arr_origin[101][101] = { 0, }; int arr[101][101] = { 0, }; int rain[101] = { 0, }; // 비의 양 오면 1 int rain_cnt = 0; int limit = 6; int result = 0; int biggist_result = 0; int x_offset[4] = {0,0,-1,1}; // 상 하 좌 우 int y_offset[4] = {1,-1,0,0}; void func(int x, int y); int main(void) { cin >> n; for (int i = 0; i < n; i++) { for (i..
2018. 7. 19.