哪位大佬来help help me(救救我)
查看原帖
哪位大佬来help help me(救救我)
1200318
ly15683638870楼主2024/12/10 20:23
#include<bits/stdc++.h>
#include<vector>
using namespace std;
int a[10001];
int n;
int main(){
cin>>n;
for(int i=1;i<=n;i++)a[i]=i;
do{
	for(int i=1;i<=n;i++)cout<<a[i]<<"    ";cout<<endl;
}while(next_permutation(a+1,a+n+1));

	return 0;
}
2024/12/10 20:23
加载中...