백준 알고리즘/시뮬레이션43 백준 5532번 C++ #include #include using namespace std; int main(void) { int l, a, b, c, d,homeworkday; cin >> l >> a >> b >> c >> d; if (a%c == 0) homeworkday = a / c; else homeworkday = a / c + 1; if(b%d==0) homeworkday = max(homeworkday,b/d); else homeworkday = max(homeworkday, b/d+1); cout 2019. 8. 28. 백준 2164번 C++ #include #include using namespace std; int main(void) { int n; cin >> n; list num; for (int i = 1; i 2019. 8. 28. 백준 15685번 C++ #include #include #include using namespace std; const int MAX = 101; struct Move { int x, y; }; Move mv[4] = { {1,0}, {0,-1}, {-1,0}, {0,1} }; int main(void) { int n; int visited[MAX][MAX]; cin >> n; for (int i = 0; i > x >> y >> d >> g; vector dir; dir.push_back(d); for (int k = 0; k = 0; j--) { dir.. 2019. 8. 28. 백준 14503번 C++ #include #include #include using namespace std; const int MAX = 51; int n, m, r, c, d; int map[MAX][MAX],visited[MAX][MAX]; bool rangecheck(int i, int j) { if (i >= 0 && i = 0 && j < m) return true; else return false; } void vacuum(int i, int j, int dir) { visited[i][j] = 1; for (int k = 0; k < 4; k++) { if (dir == 0) { dir = 3; if (map[i][j - 1] == 0 && visited[i][j - 1] == -1 && rang.. 2019. 8. 28. 이전 1 ··· 3 4 5 6 7 8 9 ··· 11 다음