Type: Default 1000ms 256MiB

Problem III

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述:

给出NN个整数AiA_i,求这NN个整数所有连续的区间中单调递增区间的个数。

单调递增区间是指对于一个[L,R][L,R],所有满足L<=i<RL<=i<Rii,都有Ai<Ai+1A_i<A_{i+1}

输入格式:

NN

A1 A2...ANA_1\ A_2...A_N

输出格式:

一个整数表示答案

样例:

5
1 2 3 2 1
8

有8个满足条件的L,R分别是:(1,1)、(1,2)、(1,3)、(2,2)、(2,3)、(3,3)、(4,4)、(5,5)。

提示

对于50%的数据1<=N<=10001<=N<=1000

对于100%的数据1<=N<=1000001<=A<=1000001<=N<=100000,1<=A<=100000

摸底测试

Not Attended
Status
Done
Rule
IOI
Problem
7
Start at
2025-8-7 8:00
End at
2025-8-7 12:00
Duration
4 hour(s)
Host
Partic.
69