cswork / OA打开练习工作台

DeloitteOA #4

Count Divisible Permutations

估计中等评测数据准备中,可先阅读题面

考点(AI 标注)剪枝搜索树形博弈

SDE-1

Constraints

1 ≤ n ≤ 15

Example 1

Input:

n = 2

Output:

2

Explanation: The first Divisible Permutation is [1,2]: permutation[1] = 1 is divisible by i = 1 permutation[2] = 2 is divisible by i = 2 The second Divisible Permutation is [2,1]: permutation[1] = 2 is divisible by i = 1 i = 2 is divisible by permutation[2] = 1