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 |
又一超级大水题,就和A+B一样一样的..#include<iostream> #include<string> #include<algorithm> int main() { std::ios::sync_with_stdio(false); for(std::string s;std::cin>>s&&s!="#";) if(std::next_permutation(s.begin(),s.end())) std::cout<<s<<std::endl; else std::cout<<"No Successor"<<std::endl; return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator