Submission #884381

# Submission time Handle Problem Language Result Execution time Memory
884381 2023-12-07T09:12:54 Z lalig777 Hindeks (COCI17_hindeks) C++14
45 / 50
144 ms 2392 KB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
	int n;
	cin>>n;
	vector<int>papers(n);
	for (int i=0; i<n; i++) cin>>papers[i];
	sort(papers.begin(), papers.end());
    for (int k=0; k<n; k++){
    	if (papers[k]>=n-k){
    		cout<<n-k<<endl;
    		return 0;
    	}
    }return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 4 ms 348 KB Output is correct
8 Correct 28 ms 604 KB Output is correct
9 Correct 144 ms 2392 KB Output is correct
10 Correct 70 ms 1372 KB Output is correct