[알고리즘] 백준 2623 - 음악 프로그램 (C++)
[문제 링크] : https://www.acmicpc.net/problem/2623#include #include #include using namespace std;int N, M;int Arr[1001];vector V[1001];void solve(){ queue Q; for(int i=1; i Ans; while(Q.empty() == false){ int num = Q.front(); Q.pop(); Ans.push_back(num); for(int i=0; i> N >> M; int cnt, inp; for(int i=0; i tmp; cin >> cnt; for(int j=0; j> inp;..