Submission #86442

# Submission time Handle Problem Language Result Execution time Memory
86442 2018-11-26T10:22:16 Z Asag Hindeks (COCI17_hindeks) C++14
0 / 50
691 ms 18144 KB
#include <bits/stdc++.h>
using namespace std;
int n , mn = 1e9,b[500000 + 5],cnt[500000 + 5];set <int> s;set <int>::iterator it;
int main()
{
	cin>>n;
	for(int i = 1; i <= n;i ++)
	{
		int l;
		cin>>l;
		cnt[l]++;
		s.insert(l);
	}
	for(it = s.begin();it != s.end() ;it  ++)
	{
		if(n - cnt[*it] > *it)
		{
			cout<<n - cnt[*it];
			return 0;
		}
	}
	cout<<mn + 1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 376 KB Output isn't correct
2 Incorrect 2 ms 480 KB Output isn't correct
3 Incorrect 2 ms 480 KB Output isn't correct
4 Incorrect 3 ms 480 KB Output isn't correct
5 Incorrect 2 ms 480 KB Output isn't correct
6 Incorrect 3 ms 480 KB Output isn't correct
7 Incorrect 8 ms 760 KB Output isn't correct
8 Incorrect 92 ms 3960 KB Output isn't correct
9 Incorrect 691 ms 18144 KB Output isn't correct
10 Incorrect 195 ms 18144 KB Output isn't correct