#include #include using namespace std; int main(){ int n, sum, digit; cin >> n; for(int i=1; i
#include #include using namespace std; int main() { vector N(6); for(int i = 0; i> N[i]; for(int x = -1000; x
#include #include #include using namespace std; #define MAX 101 int n, m; int recommend[MAX]; int main(){ cin >> n >> m; vector students(n); for (int i = 0; i > pick; recommend[pick]++; bool check = true; for (int j = 0; j < n; j++){ if (students[j].second == 0){ students[j].second = pick; students[j].first = i; check = false; break; } else if (students[j].second == pic..
#include #include using namespace std; int main(){ int students[31]={0}; int n; for(int i=1; i> n; students[n]=1; } for(int i=1; i
처음 시도한 풀이: 실패 #include #define MAX 10 using namespace std; int main(){ int R, C; cin >> R >> C; char map[MAX][MAX]={0}; char update_map[MAX][MAX]={0}; for(int i=1; i map[i][j]; } } int count = 0; for(int i=1; i
#include #include using namespace std; int main(){ int n; queueq; cin >> n; for(int i=1; i 1){ q.pop(); q.push(q.front()); q.pop(); } cout
#include using namespace std; int main(){ int A, B, C, M; int fatigue = 0, time = 0, work = 0, rest = 0, burnout = 0; cin >> A >> B >> C >> M; rest = C; burnout = M; if(A > M){ cout
#include using namespace std; int v, e; const int MAX = 101; int V[MAX][MAX] = { 0, }; bool checked[MAX] = { 0, }; int count = 0; void DFS(int x) { checked[x] = true; count++; for (int i = 1; i > v >> e; for (int i = 0; i > n >> m; V[n][m] = 1; V[m][n] = 1; } DFS(1); cout