제출 #86511

#제출 시각아이디문제언어결과실행 시간메모리
86511AsagHindeks (COCI17_hindeks)C++14
45 / 50
230 ms4420 KiB
#include <bits/stdc++.h> using namespace std; long long n , mn = 1,cnt,mx = 1e7,sum,a[500000 + 5]; int main() { cin>>n; for(int i = 1; i <= n;i ++) { cin>>a[i]; } sort(a + 1, a + n + 1); for(int i = 1; i <= n ;i ++) { cnt++; if(n - cnt >= a[i]) { mn = n - cnt; } } cout<<mn; }
#Verdict Execution timeMemoryGrader output
Fetching results...