0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 02:18:48 +00:00

P1866 编号

R52232232
This commit is contained in:
Baoshuo Ren 2021-07-01 08:03:18 +08:00 committed by Baoshuo Ren
parent 4fbd999f3a
commit e7613a7db1
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,20 @@
#include <bits/stdc++.h>
using namespace std;
int n, a[55];
long long ans = 1;
int main() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
sort(a + 1, a + n + 1);
for (int i = 1; i <= n; i++) {
ans *= a[i] - i + 1;
ans %= 1000000007;
}
cout << ans << endl;
return 0;
}