백준 17144 미세먼지 안녕! 혼내주기
t번만큼 미세먼지 확산과 공기청정기 가동을 해주면 된다. 확산에서는 모든 먼지들을 큐에 넣어서 다른 확산되어 날라온 값에 영향을 받지 않도록 했다. 청정은 귀찮지만 그냥 구현하면 된다. #include #define fastio ios::sync_with_stdio(0), cin.tie(0) using namespace std; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; pair purifier; int arr[51][51]; int n, m, t, ans = 0; struct dust { int x, y, value; dust(int a, int b, int c) { x = a, y = b, value = c; } }; void input() { f..
혼내주기
2021. 7. 23. 15:57