#include<algorithm> #include<iostream> using namespace std; #include<algorithm> int main() { int a[3]={1,2,3}; do { int i; for(i=0;i<3;i++) { cout<<a[i]; } cout<<endl; }while(next_permutation(a,a+3)); return 0; }
原文地址:https://www.cnblogs.com/zhangshuyao/p/8672981.html
时间: 2024-10-24 04:35:18