3285.cpp (273B)
1 class Solution { 2 public: 3 vector<int> stableMountains(vector<int> &height, int threshold) { 4 vector<int> res; 5 6 for (int i = 1; i < size(height); i++) { 7 if (height[i - 1] > threshold) res.push_back(i); 8 } 9 10 return res; 11 } 12 };