Card Bag
1156F2300· international master2s512 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
51 1 4 2 3
Output
299473306
Sample 2of 4
Input
22 2
Output
1
Sample 3of 4
Input
54 5 1 3 2
Output
0
Sample 4of 4
Input
41 3 4 3
Output
748683265
58%
1156F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)