cf/mirror

Sakurako's Task

CF
2008G1800· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
1 3
3
2 10
1 1
3 1
1 2 3
3 2
1 2 4
4 5
2 2 2 16
4 5
2 2 2 3
Output
2
11
3
4
8
8
2008G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)