코딩테스트
[실2] 4963 - 섬의 개수
#include #include using namespace std;#define FAST_IO() ios::sync_with_stdio(0); cin.tie(0);pair dir[]{ {1, 0}, // 상 {-1, 0}, // 하 {0, -1}, // 좌 { 0, 1 }, // 우 // 대각선 {1, 1}, {-1, -1}, {1, -1}, {-1, 1},};vector> map;int h, w;void Dfs(int y, int x){ for (int i = 0; i = h || ny = w || nx > w >> h; if (!w && !h) break; //map.resize(h, vector(w)); map = vector>(h, vector(w)); for (i..