ps:problems:boj:11004
K번째 수
| ps | |
|---|---|
| 링크 | acmicpc.net/… |
| 출처 | BOJ |
| 문제 번호 | 11004 |
| 문제명 | K번째 수 |
| 레벨 | 실버 5 |
| 분류 |
선택 알고리즘 |
| 시간복잡도 | O(n) |
| 인풋사이즈 | n<=5,000,000 |
| 사용한 언어 | Python |
| 제출기록 | 623580KB / 2848ms |
| 최고기록 | 3692ms |
| 해결날짜 | 2020/12/21 |
풀이
코드
"""Solution code for "BOJ 11004. K번째 수".
- Problem link: https://www.acmicpc.net/problem/11004
- Solution link: http://www.teferi.net/ps/problems/boj/11004
"""
from teflib import algorithm
def main():
N, K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
print(algorithm.nth_element(A, K))
if __name__ == '__main__':
main()
- Dependency: teflib.algorithm.nth_element
ps/problems/boj/11004.txt · 마지막으로 수정됨: 2021/01/03 17:21 저자 teferi

토론