Submission #86445

# Submission time Handle Problem Language Result Execution time Memory
86445 2018-11-26T10:24:21 Z Asag Hindeks (COCI17_hindeks) C++14
0 / 50
720 ms 18264 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 - sum;
			return 0;
		}
	}
	cout<<mn + 1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 508 KB Output isn't correct
3 Incorrect 2 ms 508 KB Output isn't correct
4 Incorrect 2 ms 508 KB Output isn't correct
5 Incorrect 2 ms 508 KB Output isn't correct
6 Incorrect 3 ms 508 KB Output isn't correct
7 Incorrect 8 ms 876 KB Output isn't correct
8 Incorrect 80 ms 3988 KB Output isn't correct
9 Incorrect 720 ms 18264 KB Output isn't correct
10 Incorrect 172 ms 18264 KB Output isn't correct