class Solution { public: vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) { vector<bool> prob; int max = 0; for (const auto& c_num:candies) { if (c_num>max) { max = c_num; } } for (const auto& c_num:candies) { if (extraCandies+c_num >= max) { prob.emplace_back(true); } else { prob.emplace_back(false); } } return prob; } };