cf/mirror

Alternating Subsequence

CF
1343C1200· pupil1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
5
1 2 3 -1 -2
4
-1 -2 -1 -3
10
-2 8 3 8 -4 -15 5 -2 -3 1
6
1 -1000000000 1 -1000000000 1 -1000000000
Output
2
-1
6
-2999999997
1343C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)