[백준] 7576번: 토마토(C++)
·
개발/알고리즘
문제 링크https://www.acmicpc.net/problem/7576 코드 구현#include #include #include #include using namespace std;vector> box;int days[1000][1000];queue> q;vector> dir = { {0, -1}, {0, 1}, {-1, 0}, {1, 0} };bool IsValid(int x, int y){ if (x >= 0 && x = 0 && y now = q.front(); q.pop(); for (int i = 0; i > m >> n; box.resize(n); for (int i = 0; i > t; box[i].push_back(t); // 처음부터 익어있는 토마토 큐에 삽입 if ..