Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

又一超级大水题,就和A+B一样一样的..

Posted by lgeecn at 2012-08-26 21:22:05 on Problem 1146
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator