谁能告诉我爱奇艺奶牛那题我的问题在哪。。。。。
不知道为什么一直是通过60%。。。。。。
int main()
{
int n;
while (cin >> n)
{
int buff;
vector<int> no;
for (int i = 0; i < n; i++)
{
cin >> buff;
no.push_back(buff);
}
sort(no.begin(), no.end(), less<int>());
long long count = 1;
for (int i = 0; i < n; i++)
count = count * (no[i] - i);
count = count % 1000000007;
cout << count << endl;
}
return 0;
}
深信服公司福利 729人发布