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. XFF的学习+修改源码--Are you in class

    这几天有做天枢CTF的“Are you in class”的题目,虽然以前了解过XFF,但还是没有很好地应用,而且最后居然掉进了一个大坑,且听我细细讲来.   打开题目,首先有个提示“在不在学校主要看 ...

  2. Codeforces Beta Round #44 (Div. 2)

    Codeforces Beta Round #44 (Div. 2) http://codeforces.com/contest/47 A #include<bits/stdc++.h> ...

  3. linux ubuntu 18.04 无线网卡 rtl8821ce的安装

    解压rtl8821ce.zip 修改makefile,在shell中输入pwd,查看当前文件的路径,之后在Makefile中查找export Topdir ?=  /home/zzm/Download ...

  4. 微信小程序开发——setData的使用技巧

    前言: 之前使用 setData,一直都是作为给变量赋值,感觉比起vue给data中的变量的赋值还是有点麻烦的. 最近项目不太紧张,为了提高小程序的开发效率及提升小程序开发的能力,又重新的通读了下小程 ...

  5. vue的双向数据绑定实现原理

    在目前的前端面试中,vue的双向数据绑定已经成为了一个非常容易考到的点,即使不能当场写出来,至少也要能说出原理.本篇文章中我将会仿照vue写一个双向数据绑定的实例,名字就叫myVue吧.结合注释,希望 ...

  6. TZOJ 3295 括号序列(区间DP)

    描述 给定一串字符串,只由 “[”.“]” .“(”.“)”四个字符构成.现在让你尽量少的添加括号,得到一个规则的序列. 例如:“()”.“[]”.“(())”.“([])”.“()[]”.“()[( ...

  7. [剑指Offer]12-矩阵中的路径(回溯)

    题目链接 https://www.nowcoder.com/practice/c61c6999eecb4b8f88a98f66b273a3cc?tpId=13&tqId=11218&t ...

  8. java 向上转型和向下转型

    学习向上转型和向下转型怎么用没多难,但是为什么那样用,我搞了很多次没弄明白.没弄明白的原因是平时学习时之看例子,而例子一般都比较简单,没有对象之间的调用,一般就是一个对象调用自己的方法. 首先看下怎么 ...

  9. CSS day49

    前端基础之CSS CSS介绍 CSS(Cascading Style Sheet,层叠样式表)定义如何显示HTML元素. 当浏览器读到一个样式表,它就会按照这个样式表来对文档进行格式化(渲染). CS ...

  10. 16.Mysql SQL Mode

    16.SQL Mode及相关问题SQL Mode定义了Mysql支持的SQL语法和数据校验级别,Mysql支持多种SQL Mode.用途: 设置不同的SQL Mode可以对数据进行不同严格程度的校验, ...