백준 22352 항체 인식 혼내주기
UCPC 예선 B. 배열을 돌면서 원본과 백신 후의 값이 다른 곳을 찾으면 거기서 백신값으로 bfs로 flood fill을 하고 백신 후와 비교하면 된다. #include #define fastio ios::sync_with_stdio(0), cin.tie(0) using namespace std; using ll = long long; using pii = pair; #define all(v) v.begin(), v.end() int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; int orig[30][30], after[30][30]; bool visited[30][30]; int n, m; void inpu..
혼내주기
2021. 8. 2. 00:40