링크 : https://programmers.co.kr/learn/courses/30/lessons/42586
#include <string>
#include <vector>
#include <queue>
using namespace std;
vector<int> solution(vector<int> progresses, vector<int> speeds) {
vector<int> answer;
queue<int> q;
for(int i = 0; i < progresses.size(); i++){
int day = (100 - progresses[i] / speeds[i];
if((day * speeds[i] + progresses[i]) != 100) day++;
q.push(day);
}
while(!q.empty()){
int release = q.front();
q.pop();
int sum = 1;
while((!q.empty()) && (release >= q.front())){
q.pop();
sum ++;
}
answer.push_back(sum);
}
return answer;
}