Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 문제해결
- 문제풀이
- 코테
- 문자열
- db
- priorityqueue
- 건강
- SQL
- BFS
- oracle
- 자바
- MySQL
- greedy
- 러닝일지
- math
- BOJ
- DP
- 알고리즘
- 코딩테스트
- 이분탐색
- binary search
- 운동기록
- 투포인터
- Java
- SWEA
- 시뮬레이션
- COS PRO
- 프로그래머스
- dfs
- 백준
Archives
- Today
- Total
슈콩
[BOJ] 백준 11656 접미사 배열 본문
[문제]
http://acmicpc.net/problem/11656
[소스 코드]
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
String s = br.readLine();
int length = s.length();
List<String> list = new ArrayList<>();
for(int i=0;i<length;i++) {
list.add(s.substring(i,length));
}
list.sort((a,b)->{
return a.compareTo(b);
});
for(String suffix : list) {
sb.append(suffix + "\n");
}
System.out.println(sb);
}
}'Algorithms > Baekjoon' 카테고리의 다른 글
| [BOJ] 백준 5648 역원소 정렬 (0) | 2025.08.20 |
|---|---|
| [BOJ] 백준 2910 빈도 정렬 (0) | 2025.08.20 |
| [BOJ] 백준 10825 국영수 (0) | 2025.08.19 |
| [BOJ] 백준 11652 카드 (2) | 2025.08.19 |
| [BOJ] 백준 10814 나이순 정렬 (0) | 2025.08.19 |