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
- 애플인텔리전스
- swift
- cleanarchitecture
- CICD
- LLM
- 자료구조
- gitlab
- ReactiveX
- 알고리즘
- rxswift
- 클린아키텍처
- mvvm
- AI
- IOS
- CI/CD
- Union-Find
- Autolayout
- OperationQueue
- Content Hugging priority
- Content Compression Resistance priority
- gitlabci/cd
- apple intelligence
- 동작과정
- ai expo
- 백준
- RxSwift요약
- RxCocoa
- swift알고리즘
- 동시성프로그래밍
- 오토레이아웃
Archives
- Today
- Total
JosephCha의 개발일지
백준/2920번/음계 문제 본문

let input = readLine()!.split(separator: " ")
if input == input.sorted() {
print("ascending")
} else if input == input.sorted(by: >) {
print("descending")
} else {
print("mixed")
}
설명
- ascending일 경우는 즉 오름차수로 정렬된 상태
- dscending일 경우는 즉 내림차수로 정렬된 상태
- 나머지는 mixed
'알고리즘 및 자료구조' 카테고리의 다른 글
[스택] 백준/1874번/스택 수열 (0) | 2022.07.27 |
---|---|
[브루트 포스]백준/2798번/블랙잭 (0) | 2022.07.26 |
큐 (0) | 2022.04.20 |
스택 (0) | 2022.04.20 |
이진탐색 (0) | 2022.04.20 |