Submission #86444

# Submission time Handle Problem Language Result Execution time Memory
86444 2018-11-26T10:23:47 Z Asag Hindeks (COCI17_hindeks) C++14
0 / 50
680 ms 18284 KB
#include <bits/stdc++.h>
using namespace std;
int n , mn = 1e9,sum,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  ++)
	{
		sum+=cnt[*it];
		if(n - sum > *it)
		{
			cout<<n - cnt[*it];
			return 0;
		}
	}
	cout<<mn + 1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 456 KB Output isn't correct
4 Incorrect 2 ms 476 KB Output isn't correct
5 Incorrect 2 ms 668 KB Output isn't correct
6 Incorrect 3 ms 668 KB Output isn't correct
7 Incorrect 8 ms 936 KB Output isn't correct
8 Incorrect 89 ms 4368 KB Output isn't correct
9 Incorrect 680 ms 18284 KB Output isn't correct
10 Incorrect 195 ms 18284 KB Output isn't correct