TopCoder

ItzYouLingTW
資研社的大家好ouo/

User's AC Ratio

100.0% (4/4)

Submission's AC Ratio

50.0% (5/10)

Tags

Description

給一個長度為 $n$ 的序列 $A$,問是否滿足非嚴格遞增?
非嚴格遞增代表在序列中選一個 $i$ 並且 $1 \le i < n$,滿足 $A_i \le A_{i + 1}$。


對於所有測試資料:
$1 \le n,\ A_i \le 100$

Input Format

共輸入兩行,
第一行輸入一個數字 $n$,
第二行輸入 $n$ 個數字,第 $i$ 個數字為 $A_i$。

Output Format

輸出 YesNo

Sample Input 1

5
1 2 2 3 6

Sample Output 1

Yes

Sample Input 2

3
1 2 1

Sample Output 2

No

Sample Input 3

4
2 2 2 2

Sample Output 3

Yes

Hints

Problem Source

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測試資料 0
2 3~12 $n = 2$ 30
3 0~22 無額外限制 70

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1 3
1 1000 65536 65536 1 3
2 1000 65536 65536 1 3
3 1000 65536 65536 2 3
4 1000 65536 65536 2 3
5 1000 65536 65536 2 3
6 1000 65536 65536 2 3
7 1000 65536 65536 2 3
8 1000 65536 65536 2 3
9 1000 65536 65536 2 3
10 1000 65536 65536 2 3
11 1000 65536 65536 2 3
12 1000 65536 65536 2 3
13 1000 65536 65536 3
14 1000 65536 65536 3
15 1000 65536 65536 3
16 1000 65536 65536 3
17 1000 65536 65536 3
18 1000 65536 65536 3
19 1000 65536 65536 3
20 1000 65536 65536 3
21 1000 65536 65536 3
22 1000 65536 65536 3