답안 #884381

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
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;
}
# 결과 실행 시간 메모리 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