[알고리즘] 백준 17144 - 미세먼지 안녕!
#include #include using namespace std;int R, C, T;int V[51][51];int tmp[51][51];int Dir[4][2] = {{0, 1}, {-1, 0}, {0, -1}, {1, 0}};int UY, DY;bool flag;void move(){ for(int i=0; i= R || x >= C || V[y][x] == -1) continue; tmp[y][x] += V[i][j] / 5; tmp[i][j] -= V[i][j] / 5; } } } for(int i=0; i0; i--){ V[i][0] = V[i-1][0]; ..