KDHzoot's Github

Code for study, project, etc

자세히보기

알고리즘/PS 54

[백준 7576] 토마토

Union-find을 써서 시간을 줄이는 건줄 알았는데 그냥 BFS 단순 탐색으로 풀려버렸다. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778#include #include #define n_ 1005using namespace std ; int n, m;int arr[n_][n_];int dx[4] = { 0,1,0,-1 };int dy[4] = { 1,0,-1,0 }; typedef struct Point { int x, y, cnt;}point; queue que; void print(..

알고리즘/PS 2018.05.18