有点神奇

P1866 编号

我的c++也是30分 ``` #include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n,maxn[1005]={0},t=1; int main() { cin>>n; for(int i=1;i<=n;i++) cin>>maxn[i]; sort(maxn+1,maxn+n+1); for(int i=1;i<=n;i++) { if(maxn[i]<i) { cout<<0; return 0; } t*=(maxn[i]-i+1); t%=1000000007; } cout<<t; return 0; } ```
by yummy @ 2018-07-13 22:16:04


另外,c++和Pascal长度差那么多
by yummy @ 2018-07-13 22:16:43


另外,c++和Pascal长度差那么多
by yummy @ 2018-07-13 22:17:33


pascal没有排序函数。。。
by 白井黑子5 @ 2019-07-01 20:11:35


https://www.luogu.com.cn/discuss/show/54471
by JRzyh @ 2020-03-06 20:54:07


|