Submission #151299

#TimeUsernameProblemLanguageResultExecution timeMemory
151299Linca_RobertHindeks (COCI17_hindeks)C++14
Compilation error
0 ms0 KiB
#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 (stderr)

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