提交时间:2023-10-10 13:29:46
运行 ID: 106199
#include<bits/stdc++.h> using namespace std; int n,c,i,p[25]; int main() { cin>>n; for(i=0;i<n;i++) p[i]=i+1; do { for(i=0;i<n;i++) cout<<p[i]; cout<<'\n'; c++; } while(next_permutation(p,p+n)); cout<<c; }