| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
STL全排列实现,最短代码#include<algorithm>
#include<iostream>
#include<string>
using namespace std;
int main()
{
string a;
cin>>a;
sort(a.begin(),a.end());
cout<<a<<endl;
while(next_permutation(a.begin(),a.end()))
cout<<a<<endl;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator