lc739

class Solution {
public:
vector<int> dailyTemperatures(vector<int>& T) {
int n=T.size();
vector<int> t(n);
for(int i=0;i<n;i++)
for(int j=i+1;j<n;j++)
{
if(T[j]>T[i]){ t[i]=j-i;
break;}


}
return t;
}
};

break放到里面

和外面还不一样的。

posted @ 2020-06-14 07:29  北月真好  阅读(104)  评论(0编辑  收藏  举报