正文
增加 9 行删除 9 行
37 行未改动38394041424344454647484950515253545516 行未改动7273747576777879807 行未改动88899091929394959697989910010110210310410510610710810911043 行未改动37 行未改动{srand(time(NULL));int n;cin >> n; //输入排列长度// freopen("kkksc03.in","w",stdout);for (int i = 1; i <= n; i ++){int x = -1; //下标while (x==-1 || p[x]) x = rand() % n + 1; //如果这个数已经生成过了,为了不出现重复的数,要重新生成p[x] = i; //当前数存入排列中}for (int i = 1; i <= n; i ++)cout << p[i] << ' ';return 0;}16 行未改动还有一些制造 hack 数据的 $\texttt{gen}$,例如```cpp//P7996 制造 No answer! 情况的 gencout << 114514;for (int i = 1; i <= 114514; i ++) cout << 1 << ' ';```展示一下 P7996 的 $\texttt{gen}$:7 行未改动long long n,k,a,b;cout<<"请输入 n,k,ai 的上下值:";cin>>n>>k>>a>>b;freopen("1.in", "w", stdout);cout<<n<<" "<<k<<'\n';for(int i=0; i<n; i++){cout<<rand()%(b-a+1)+a<<' ';// if(i<50000) cout<<2500;// else cout<<3500;// cout<<' ';// cout <<"7000000 ";// cout << i+a << ' ';}return 0;}43 行未改动37 行未改动38394041424344454647484950515253545516 行未改动7273747576777879807 行未改动88899091929394959697989910010110210310410510610710810911043 行未改动37 行未改动{srand(time(NULL));int n;cin >> n; //输入排列长度// freopen("kkksc03.in","w",stdout);for (int i = 1; i <= n; i ++){int x = -1; //下标while (x==-1 || p[x]) x = rand() % n + 1; //如果这个数已经生成过了,为了不出现重复的数,要重新生成p[x] = i; //当前数存入排列中}for (int i = 1; i <= n; i ++)cout << p[i] << ' ';return 0;}16 行未改动还有一些制造 hack 数据的 $\texttt{gen}$,例如```cpp//P7996 制造 No answer! 情况的 gencout << 114514;for (int i = 1; i <= 114514; i ++) cout << 1 << ' ';```展示一下 P7996 的 $\texttt{gen}$:7 行未改动long long n,k,a,b;cout<<"请输入 n,k,ai 的上下值:";cin>>n>>k>>a>>b;freopen("1.in", "w", stdout);cout<<n<<" "<<k<<'\n';for(int i=0; i<n; i++){cout<<rand()%(b-a+1)+a<<' ';// if(i<50000) cout<<2500;// else cout<<3500;// cout<<' ';// cout <<"7000000 ";// cout << i+a << ' ';}return 0;}43 行未改动