vector<int> solution(vector<int> progresses, vector<int> speeds)
{
vector<int> answer;
map<int, int> tmp_map;
int size = progresses.size();
int* arr_days = new int[size] {0};
for (int i = 0; i < size; i++)
{
int count = 0;
for (int j = progresses[i]; j <= 100; j += speeds[i])
{
progresses[i] += speeds[i];
count++;
if (progresses[i] >= 100)
{
arr_days[i] = count;
break;
}
}
}
for (int i = 1; i < size; i++)
{
if (arr_days[i] < arr_days[i - 1])
arr_days[i] = arr_days[i - 1];
}
for (int i = 0; i < size; i++)
tmp_map[arr_days[i]]++;
for (auto& item : tmp_map)
answer.push_back(item.second);
return answer;
}