cf/mirror

Prefix Permutation Sums

CF
1851D1300· pupil3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
12
5
6 8 12 15
5
1 6 8 15
4
1 2 100
4
1 3 6
2
2
3
1 2
4
3 7 10
5
5 44 46 50
4
1 9 10
5
13 21 36 42
5
1 2 3 1000000000000000000
9
9 11 12 20 25 28 30 33
Output
YES
YES
NO
YES
YES
NO
YES
NO
NO
NO
NO
NO
1851D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)