static int wing=[]()
{
std::ios::sync_with_stdio(false);
cin.tie(NULL);
return ;
}(); class Solution
{
public:
int findLengthOfLCIS(vector<int>& nums)
{
int sz=nums.size();
if(sz<)
return sz;
int count=;
int res=INT_MIN;
for(int i=;i<sz;i++)
{
if(nums[i]>nums[i-])
count++;
else
{
res=max(res,count);
count=;
}
}
return max(res,count);
}
};

扫描一遍,问题不大

674. Longest Continuous Increasing Subsequence的更多相关文章

  1. leetcode300. Longest Increasing Subsequence 最长递增子序列 、674. Longest Continuous Increasing Subsequence

    Longest Increasing Subsequence 最长递增子序列 子序列不是数组中连续的数. dp表达的意思是以i结尾的最长子序列,而不是前i个数字的最长子序列. 初始化是dp所有的都为1 ...

  2. 【Leetcode_easy】674. Longest Continuous Increasing Subsequence

    problem 674. Longest Continuous Increasing Subsequence solution class Solution { public: int findLen ...

  3. [LeetCode] 674. Longest Continuous Increasing Subsequence 最长连续递增序列

    Given an unsorted array of integers, find the length of longest continuous increasing subsequence. E ...

  4. LeetCode 674. Longest Continuous Increasing Subsequence (最长连续递增序列)

    Given an unsorted array of integers, find the length of longest continuous increasing subsequence. E ...

  5. [Leetcode]674. Longest Continuous Increasing Subsequence

    Given an unsorted array of integers, find the length of longest continuous increasing subsequence. E ...

  6. [LeetCode&Python] Problem 674. Longest Continuous Increasing Subsequence

    Given an unsorted array of integers, find the length of longest continuousincreasing subsequence (su ...

  7. 674. Longest Continuous Increasing Subsequence最长连续递增子数组

    [抄题]: Given an unsorted array of integers, find the length of longest continuous increasing subseque ...

  8. 674. Longest Continuous Increasing Subsequence@python

    Given an unsorted array of integers, find the length of longest continuous increasing subsequence (s ...

  9. LeetCode 674. Longest Continuous Increasing Subsequence最长连续递增序列 (C++/Java)

    题目: Given an unsorted array of integers, find the length of longest continuous increasing subsequenc ...

  10. [LC] 674. Longest Continuous Increasing Subsequence

    Given an unsorted array of integers, find the length of longest continuous increasing subsequence (s ...

随机推荐

  1. MongoDB之增删改查

    MongoDB的默认端口为:27017 show  dbs   查看所有的数据库 MySQL和MongoDB的对应关系 MySQL MongoDB DB DB 数据库 table Collection ...

  2. Python+Selenium学习--浏览器设置

    场景 设置浏览器窗口的大小有下面两个比较常见的用途: 在统一的浏览器大小下运行用例,可以比较容易的跟一些基于图像比对的工具进行结合,提升测试的灵活性及普遍适用性.比如可以跟sikuli结合,使用sik ...

  3. access导入报错 请求筛选模块被配置为拒绝超过请求内容长度的请求

    原因:access文件过大 解决:用压缩和修复把收缩一下access文件 报错截图如下:

  4. dUMP:A new value is to be assigned to the field "<L_BOX>"

    DUMP: A new value is to be assigned to the field "<L_BOX>", although this field is e ...

  5. 设置TextFiled输入长度限制

    #pragma mark - 显示超过11位不让输入 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange: ...

  6. Bootstrap(9) 巨幕页头缩略图和警告框组件

    一.巨幕组件巨幕组件主要是展示网站的关键性区域.//在固定的范围内,有圆角 <div class="container"> <div class="ju ...

  7. 整站变灰CSS代码

    * { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100% ...

  8. pom.xml中坐标的组成

    坐标=组织(也就是所谓的公司名称)+项目名称+版本(如果不加范围默认为compile)

  9. 自定义标签tld的使用

    在JSP中使用标签是很平常的事情,在制作自定义标签时,通常都需要写tld文件来定义标签的各种属性,对应的Java类,前缀等等.标签与tld文件紧紧相连,那么,到底应该怎么放置tld文件?在web.xm ...

  10. andorid 列表视图 ListView 之ArrayAdapter

    activity_ui3.xml <?xml version="1.0" encoding="utf-8"?> <ListView xmlns ...