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. 转:JMeter压力测试及并发量计算

    最近的一个项目刚刚开发完,因为不是专业测试人员,所以记录下测试过程以备时间长忘记了. 一.JMeter的安装(Linux)1. 下载JMeter:这个就不细说了,直接去(http://jmeter.a ...

  2. linux 日常实用操作

    [Tab]接在一串指令的第一个字的后面,为[命令补全] [Tab]接在一串命令的第二个字以后时,则为[文件补全] 若安装bash-completion 软件,则在某些指令后面使用[Tab]按键时,可以 ...

  3. ajax请求跨域

    解决方式 1: 解决方式 2: 服务端: package ceshi_utils; import java.util.*; import com.xwhb.utils.encrypt.CipherUt ...

  4. HDU 4940 Destroy Transportation system(无源汇上下界网络流)

    Problem Description Tom is a commander, his task is destroying his enemy’s transportation system. Le ...

  5. lendinghome oa 准备

    hardcode版本 估计只能过一个吧 import java.util.*; public class NextServer { Map<Integer, Integer> server ...

  6. python脚本计算斐波那契数列

    有一列数组[1,1,2,3,5,8,,,,,],计算第n个数字的大小 def abstract(n): fibs = [1, 1] for i in range(n-2): fibs.append(f ...

  7. Excel中的常用功能

    Excel 是微软办公套装软件的一个重要的组成部分,它可以进行各种数据的处理.统计分析和辅助决策操作,广泛地应用于管理.统计财经.金融等众多领域. Excel删除公式保留数据 1.简单举例一个简单的公 ...

  8. WEB框架Django之Form组件

    Django的Form主要具有一下几大功能: 生成HTML标签 验证用户数据(显示错误信息) HTML Form提交保留上次提交数据 初始化页面显示内容 一 通过form实现校验字段功能 模型:mod ...

  9. DevExpress XPO 开发指南 简要

    最近在看devexpress   安装程序中的代码Demos ..  C:\Users\Public\Documents\DevExpress Demos 16.1\Components\WinFor ...

  10. andorid 计算器

    avtivity_main.xml <?xml version="1.0" encoding="utf-8"?> <GridLayout xm ...