cf/mirror

Insane Problem

CF
2044E1300· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
2 2 6 2 12
2 1 1000000000 1 1000000000
3 5 7 15 63
1000000000 1 5 6 1000000000
15 17 78 2596 20914861
Output
12
1999999987
6
1
197
2044E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)