Balanced Domino Placements
1237F2600· international gm2s512 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5 7 23 1 3 24 4 4 5
Output
8
Sample 2of 3
Input
5 4 21 2 2 24 3 4 4
Output
1
Sample 3of 3
Input
23 42 0
Output
102848351
58%
1237F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)