# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
97891 | AKaan37 | Hindeks (COCI17_hindeks) | C++17 | 118 ms | 7544 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long int lo;
typedef pair< int,int > PII;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
const int inf = 1000000000;
const int mod = 1000000007;
const int KOK = 100000;
const int li = 10000005;
const int LOG = 20;
lo n,m,cev,x,k,a[li];
vector<int> v;
char c;
string s;
int main(){
scanf("%lld",&n);
FOR{
scanf("%lld",&a[i]);
}
sort(a+1,a+n+1);
reverse(a+1,a+n+1);
FOR{
if(a[i]>=i) cev++;
}
printf("%lld\n",cev);
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |