mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 18:16:26 +00:00
CF1581A CQXYM Count Permutations
R60225896
This commit is contained in:
parent
66da95d37c
commit
daad3aeb18
22
Luogu/CF1581A/CF1581A.cpp
Normal file
22
Luogu/CF1581A/CF1581A.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
const int mod = 1000000007;
|
||||
|
||||
int t, inv[100005];
|
||||
long long n, ans;
|
||||
|
||||
int main() {
|
||||
cin >> t;
|
||||
while (t--) {
|
||||
ans = 1;
|
||||
cin >> n;
|
||||
n *= 2;
|
||||
while (n) {
|
||||
ans = ans * n-- % mod;
|
||||
}
|
||||
cout << ans * 500000004 % mod << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user