文章
15
粉丝
0
获赞
68
访问
12.7k
使用next_permutation函数实现
#include<bits/stdc++.h> using namespace std;
int main(){ string s; while(cin >> s){ do{ cout << s << endl; }while(next_permutation(s.begin(),s.end())); cout << endl; } return 0; }
登录后发布评论
暂无评论,来抢沙发