Submission #75029

# Submission time Handle Problem Language Result Execution time Memory
75029 2018-09-08T05:03:01 Z charlies_moo Hindeks (COCI17_hindeks) C++
15 / 50
271 ms 7648 KB
#include <cstdio>
#include <iostream>
#include <algorithm>

using namespace std;

int n,a[500001],h,j=1,count_;

bool cmp(int a,int b)
{
	return a>b;
}

int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>a[i];
	sort(a,a+n,cmp);
	for(int i=0;i<n;i++)
	{
		if(a[i]<i)
		{
			h=i;
			break;
		}
	}
	cout<<h;
	return 0;
}
# 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 3 ms 416 KB Output isn't correct
4 Incorrect 3 ms 528 KB Output isn't correct
5 Correct 3 ms 540 KB Output is correct
6 Incorrect 3 ms 540 KB Output isn't correct
7 Correct 7 ms 888 KB Output is correct
8 Correct 54 ms 1884 KB Output is correct
9 Incorrect 271 ms 7000 KB Output isn't correct
10 Incorrect 146 ms 7648 KB Output isn't correct