cf/mirror

Finding satisfactory solutions

CF
1466H3300· legendary gm5s1024 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
2
2 1
Output
1
Sample 2of 3
Input
3
1 2 3
Output
98
Sample 3of 3
Input
4
2 1 3 4
Output
27408
1466H.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…