#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Given a list of *N* integers, find the number of different ranges (*A* to *B* inclusive) where the integers are all strictly ascending. The first number in the list will be considered as number 0. (0 ≤ *A* < *B* < *N*)

## Input

The first row will contain a single integer, *N*, denoting the number of numbers in the list.

The second row will contain *N* non-negative integers, of which all does not exceed 1 million.

## Output

A single integer denoting the number of different ranges of the list where the integers are all strictly ascending.

## Subtasks

Subtask 1 (15%): *N* = 200

Subtask 2 (35%): *N* = 5000

Subtask 3 (50%): *N* = 100000

Subtask 4: Sample

## Sample Testcase 1

Input:

10 1 2 3 4 4 5 6 7 8 9

Output:

21

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 15 | 10 | 1s | 64MB | Minimum |

2 | 35 | 10 | 1s | 64MB | Minimum |

3 | 50 | 10 | 1s | 64MB | Minimum |

4 | 0 | 1 | 1s | 64MB | Minimum |

### Judge Compile Command

g++-7 ans.cpp -o ascendinglist -Wall -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512