백준 낚시왕 C++
#include #include #include #include using namespace std; const int MAX = 101; vector shark[MAX][MAX]; int r, c, m; int hunter = 0; struct Move { int x, y; }; Move mv[4] = { {-1,0} , {1,0}, {0,1}, {0,-1} }; int main(void) { int answer = 0; cin >> r >> c >> m; for (int i = 0; i > r >> c >> s >> d >> z; shark[r][c].push_back(make_pair(s, make_pair(d-1, z))); } wh..
2019. 10. 17.
백준 나무 재테크 C++
#include #include #include using namespace std; const int MAX = 11; int map[MAX][MAX]; int n, m, k; int nutrient[MAX][MAX]; vector tree[MAX][MAX]; struct Move { int x, y; }; Move mv[8] = { {-1,-1}, {-1,0}, {-1,1}, {0,-1}, {0,1}, {1,-1}, {1,0}, {1,1} }; void treegrow() { //string,summer for (int i = 1; i n >> m >> k; for (int i = 1; i map[i][j]; nutrient[i][j] = 5; } } for (int i = 0; i < m; i++)..
2019. 10. 16.