cf/mirror

Removal of a Sequence (Easy Version)

CF
2169D11500· specialist2s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
2 3 5
2 5 1
20 2 1000000000000
175 10 28
100000 998244353 1999999999
1 1 1
Output
10
1
-1
2339030304
2000199999
-1
2169D1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)