CF 1909F1 - Small Permutation Problem (Easy Version)

Working

CF 1909F1 - Small Permutation Problem (Easy Version)

Rating: 2200
Tags: brute force, combinatorics, dp, math
Solve time: 46s
Verified: no

Solution

Working