class Solution {
public:
vector<int> maxInWindows(const vector<int>& num, unsigned int size) {
vector<int> ret;
int len = num.size();
if (len < size || size == 0) {
return ret;
}
for (int i = 0; i <= len - size; i++) {
int tempMax = INT_MIN;
for (int j = i; j < size + i; j++) {
tempMax = max(tempMax, num[j]);
}
ret.push_back(tempMax);
}
return ret;
}
};