벡터1 백준 11004번 k번째 수 c++/정렬/실버5 https://www.acmicpc.net/problem/11004 11004번: K번째 수 수 N개 A1, A2, ..., AN이 주어진다. A를 오름차순 정렬했을 때, 앞에서부터 K번째 있는 수를 구하는 프로그램을 작성하시오. www.acmicpc.net arr 벡터에 값을 넣고 정렬해서 k번째 수를 출력한다. #include #include #include using namespace std; int main() { //ios_base::sync_with_stdio(false); ios_base::sync_with_stdio(0); cin.tie(0); int n, k, a; cin >> n >> k; vector arr; for (int i = 0; i > a; ar.. 2023. 10. 27. 이전 1 다음