cf/mirror

Marek and Matching (hard version)

CF
1210F23200· legendary gm15s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
2
50 50
50 50
Output
937500007
Sample 2of 2
Input
3
3 1 4
1 5 9
2 6 5
Output
351284554
1210F2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)