标签:code 窗口 font family item cto sign 最大值 signed
1 class Solution { 2 public: 3 vector<int> maxInWindows(const vector<int>& num, unsigned int size) 4 { 5 int length = num.size(); 6 vector<int> res; 7 if(length < size || size == 0) 8 return res; 9 int Max = -1; 10 for(int i = 0;i <= length - size;i ++){ 11 Max = num[i]; 12 for(int j = i + 1;j < i + size;j ++) 13 if(Max < num[j]) Max = num[j]; 14 res.push_back(Max); 15 } 16 return res; 17 } 18 };
标签:code 窗口 font family item cto sign 最大值 signed
原文地址:http://www.cnblogs.com/lca1826/p/6579436.html