PermuTree (easy version)
1856E11800· expert2s512 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
51 1 3 3
Output
4
Sample 2of 4
Input
21
Output
0
Sample 3of 4
Input
61 2 2 1 5
Output
7
Sample 4of 4
Input
41 1 1
Output
2
58%
1856E1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…