
λμ νμ΄
testcase = int(input("ν
μ€νΈ μΌμ΄μ€μ μλ₯Ό μ
λ ₯")) # λ°λ³΅ν μΌμ΄μ€μ μλ₯Ό μ§μ
for i in range(testcase):
N,s,e,k = map(int,input().split()) κ° μΌμ΄μ€λ³ N,s,e,k μ μ§μ

λΉ λ°°μ΄μ μμ±
Nκ°μ μ«μλ₯Ό μ
λ ₯λ°μ 리μ€νΈμ μ μ₯

N κ°μ μ«μμμ
s λ²μ§Έ λΆν° e λ²μ§Έ κΉμ§μ μλ₯Ό μ€λ¦μ°¨μ μ λ ¬ β> sort()
μ λ ¬λ λ°°μ΄μμ k λ²μ§Έ μ«μ β> result[k-1]


μ€λκ±Έλ €λ νκΈ΄νλ€
κ°μλ₯Ό λ³΄κ³ μ보μ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
μ νμμ
λ΄κ° μ°λ νλ‘κ·Έλ¨μ νμ€μ© μ
λ ₯λ°κ³ μΆλ ₯λ°μμ κ°μλ κ²°κ³Όκ° μ’ λ€λ¦ ( κ΄ν λκ°μ΄ νλ€κ³ κ³ μν¨ )

'Algorithm > νμ΄μ¬ μ½λ©ν μ€νΈ' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
μ½λ ꡬνλ ₯ κΈ°λ₯΄κΈ° / 6. μλ¦Ώμμ ν© (0) | 2023.01.05 |
---|---|
μ½λ ꡬνλ ₯ κΈ°λ₯΄κΈ° / 5. μ λ€λ©΄μ²΄ (0) | 2023.01.05 |
μ½λ ꡬνλ ₯ κΈ°λ₯΄κΈ° / 4. λνκ° (0) | 2023.01.04 |
μ½λ ꡬνλ ₯ κΈ°λ₯΄κΈ° / 3. Kλ²μ§Έ ν° μ (0) | 2023.01.03 |
μ½λ ꡬνλ ₯ κΈ°λ₯΄κΈ° / 1. Kλ²μ§Έ μ½μ (0) | 2023.01.03 |