cf/mirror

Median on Segments (General Case Edition)

CF
1005E22400· grandmaster3s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5 4
1 4 5 60 4
Output
8
Sample 2of 3
Input
3 1
1 1 1
Output
6
Sample 3of 3
Input
15 2
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
Output
97
1005E2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)