Advertisement
ShafiulAzim

codeforces 984A

Feb 19th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,i,x,mid;
  6. vector<int>v;
  7. cin>>n;
  8. for(i=0;i<n;i++){
  9. cin>>x;
  10. v.push_back(x);
  11. }
  12. sort(v.begin(),v.end());
  13.  
  14. mid=(n-1)/2;
  15. cout<<v[mid]<<endl;
  16.  
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement