题意: N个人两等分,分别在两个序列中跳舞。N保证为偶数。 跳舞过程中,因为是围在一起跳舞的,所以一个序列可以通过旋转或得到另一个序列,则认为这两个序列是相同的。 问共有多少种跳舞的分配方法序列。 题解:
code:
#include<bits/stdc++.h>
using namespace std
;
#define ll long long
int main(){
ll n
;
cin
>>n
;
ll res
=1;
for(int i
=1;i
<=n
;i
++){
res
*=i
;
}
ll y
=(n
/2)*(n
/2);
res
/=y
;
cout
<<res
/2<<endl
;
}
转载请注明原文地址: https://lol.8miu.com/read-24211.html