#include #include /* 1 ≤ N ≤ 5 000, 1 ≤ размерът на всеки буркан ≤ 1 000 000. */ #define MAXPOOH 1000000 int n,m,p; int cnt_pooh[MAXPOOH]; int pooh[MAXPOOH]; int max_pooh,pooh_ind,t,v; int main(int argc, char * argv[]) { pooh_ind=0; max_pooh=0; freopen("pooh.in","r",stdin); freopen("pooh.out","w",stdout); scanf("%d\n",&n); for(int i=0;ipooh_ind) { pooh_ind=m; pooh[pooh_ind]=p; } } } t=MAXPOOH; v=0; for(m=0;m<=pooh_ind;m++) { if(cnt_pooh[pooh[m]]