#include using namespace std; int main(){ int n; cin >> n; vector types(n); for(int types_i = 0; types_i < n; types_i++){ cin >> types[types_i]; } // your code goes here sort(types.begin(),types.end()); int cnt,ans,max=-1,i; ans=types[0]; cnt=1; for(i=1;imax) { ans=types[i-1]; } printf("%d\n",ans); return 0; }