# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
97079 | 2019-02-13T18:18:29 Z | karlopuh | Hindeks (COCI17_hindeks) | C++14 | 233 ms | 2500 KB |
#include <bits/stdc++.h> using namespace std; vector< int > cit; int n; int main(){ cin>>n; for(int i=0;i<n;i++){ int broj; cin>>broj; cit.push_back(broj); } sort(cit.begin(),cit.end()); int rj = 0; for(int i=1;i<cit.size();i++){ if(cit[cit.size()-i]>=i){ rj=i; }else{ cout<<rj; return 0; } } cout<<rj; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 384 KB | Output is correct |
2 | Incorrect | 2 ms | 384 KB | Output isn't correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 2 ms | 128 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 2 ms | 256 KB | Output is correct |
7 | Correct | 5 ms | 384 KB | Output is correct |
8 | Correct | 38 ms | 1020 KB | Output is correct |
9 | Correct | 233 ms | 2500 KB | Output is correct |
10 | Incorrect | 101 ms | 1520 KB | Output isn't correct |