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 |
这题,真直接……#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int main() { int n; cin>>n; for(int i=0;i<n;i++) { int t; char k[1010]; cin>>t>>k; cout<<t<<" "; if(next_permutation(k,k+strlen(k))==true) cout<<k<<endl; else cout<<"BIGGEST"<<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