https://www.acmicpc.net/problem/11656
11656번: 접미사 배열
첫째 줄에 문자열 S가 주어진다. S는 알파벳 소문자로만 이루어져 있고, 길이는 1,000보다 작거나 같다.
www.acmicpc.net
https://github.com/stellaluminary/Baekjoon
GitHub - stellaluminary/Baekjoon
Contribute to stellaluminary/Baekjoon development by creating an account on GitHub.
github.com
import sys
input = sys.stdin.readline
s = input().rstrip()
ans = []
for i in range(len(s)):
ans.append(s[i:])
ans.sort()
print('\n'.join(ans))