cf/mirror

A Convex Game

CF
1434E3500· legendary gm3s512 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
1
10
1 2 3 4 5 6 7 8 9 10
Output
YES
Sample 2of 3
Input
2
10
1 2 3 4 5 6 7 8 9 10
10
1 2 3 4 5 6 7 8 9 10
Output
NO
Sample 3of 3
Input
4
7
14404 32906 41661 47694 51605 75933 80826
5
25374 42550 60164 62649 86273
2
7002 36731
8
23305 45601 46404 47346 47675 58125 74092 87225
Output
NO
1434E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…