#include<bits/stdc++.h>
using namespace std;
string f[10001];
int cnt;
int main()
{
string s;
cin>>s;
for(int i=0;i<s.size();i++)
{
for(int j=i;j<s.size();j++)
{
f[++cnt] = s.substr(i,j-i+1);
}
}
sort(f+1,f+cnt+1);
cout<<f[1]<<endl;
for(int i=2;i<=cnt;i++)
{
if(f[i]!=f[i-1])
{
cout<<f[i]<<endl;
}
}
}1
文章信息与版本
文章信息
- 发布
- 2024年7月1日
- 收录
- 2026年7月2日
- 更新
- 2026年11月11日
- 篇幅
- 约 1 分钟