Submission #151299

# Submission time Handle Problem Language Result Execution time Memory
151299 2019-09-02T12:02:42 Z Linca_Robert Hindeks (COCI17_hindeks) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

int N, arr[500005];
int main(){
    cin >> N;
    for( int i = 1; i <= N; i++ )
        cin >> arr[i];
    sort( arr+ 1, arr + N + 1 );
    for( int i = N; i >= 1; i-- ){
        if( arr[i] < N - i + 1 ){
            cout << N - i << endl;
           return 0
        }
    }
    cout << N << endl;
    return 0;
}

Compilation message

hindeks.cpp: In function 'int main()':
hindeks.cpp:14:9: error: expected ';' before '}' token
         }
         ^