This commit is contained in:
HuangHai
2025-08-30 18:35:01 +08:00
commit 1f397eca87
6258 changed files with 1487241 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MOD = 1000000007;
const int N = 51; //50只兔子是上限值
int n; //具体是几只兔子
int nums[N]; //字牌编号
int main() {
LL ans = 1;
cin >> n;
for (int i = 1; i <= n; i++)cin >> num[i];
sort(num + 1, num + 1 + n);//排序,贪心
for (int i = 1; i <= n; i++) {
ans *= (num[i] - i + 1);
ans %= MOD; //边乘边模,使用了同余定理
}
//输出结果
cout << ans << endl;
return 0;
}