```
vector<int> searchRange(vector<int>& nums, int target) {
vector<int> solution(2, -1);
int low = upper_bound(nums.begin(), nums.end(), target - 1) - nums.begin();
if (low == nums.size() || nums[low] != target) return solution;
solution[0] = low;
int up = upper_bound(nums.begin(), nums.end(), target) - nums.begin();
solution[1] = up - 1;
return solution;
}
```