2019-02-09

2019-02-09  本文已影响0人  小路子好

include<iostream>

include<string>

include<vector>

include<algorithm>

using namespace std;

int main()
{
string s;
while(cin>>s)
{
int leth = s.length();
vector<string> vs;
for(int i=0;i<leth;i++)
{
string subs = s;
subs.erase(0,i);
vs.push_back(subs);
}
sort(vs.begin(),vs.end());
for(vector<string>::iterator it=vs.begin();it!=vs.end();it++)
{
cout<<*it<<endl;
}
}
return 0;
}

上一篇下一篇

猜你喜欢

热点阅读