|
|
back to boardWhy stack overflow? Help me, please! Posted by Daniil 24 Jan 2014 22:04 #include<iostream> using namespace std; int main () { int n,a[500000],d,max=0,maxi; cin>>n; for (int i=0;i<n;i++) { cin>>d; a[d]++; if (a[d]>max) { max=a[d]; maxi=d; } } cout<<maxi; return 0; } Re: Why stack overflow? Help me, please! 0 ≤ K ≤ 10^9 Edited by author 20.05.2014 20:54 |
|
|