class Solution { public: int duplicate(vector<int>& numbers) { int a[10000]={0}; for(auto &e:numbers) { a[e]++; } for(int i=0;i<10000;++i) { if(a[i]>=2) return i; } return -1; } };