#include<bits/stdc++.h> using namespace std; int main(){ int n=0,m=0; cin>>n>>m; int a[n]={0}; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); for(int i=0;i<m;i++){ cout<<a[i]<<endl; } return 0; }``

0 comments

No comments so far...

Information

ID
249
Time
1000ms
Memory
256MiB
Difficulty
5
Tags
# Submissions
30
Accepted
15
Uploaded By