#include #include using namespace std; int main(){ int n; cin >> n; vector types(n); std::map countPerType; std::map::iterator it; for(int types_i = 0; types_i < n; types_i++) { cin >> types[types_i]; it = countPerType.find(types[types_i]); if(it!=countPerType.end()) { it->second++; } else { countPerType.insert(std::pair(types[types_i], 0)); } } int max = -1111, maxId = 0; for(it = countPerType.begin(); it != countPerType.end(); it++) { if(it->second > max) {max = it ->second;maxId = it->first;} } cout<