oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

ascendinglist Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

ascendinglist.html

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

Ad Hoc

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
115101s64MBMinimum
235101s64MBMinimum
350101s64MBMinimum
4011s64MBMinimum

Judge Compile Command

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

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.