제출 #86337

#제출 시각아이디문제언어결과실행 시간메모리
86337PlutonHindeks (COCI17_hindeks)C++14
0 / 50
110 ms2500 KiB
#include <bits/stdc++.h> #define ld long double #define ll long long #define sz size() #define all(xx) xx.begin(),xx.end() #define pb push_back #define in insert #define er erase #define S second #define F first #define pii pair <int, int> #define to_be continue #define mp make_pair #define stop exit (0) #define fname "" #define speed ios_base::sync_with_stdio(0);cin.tie(0) #define input freopen (fname".in", "r", stdin) #define output freopen (fname".out", "w", stdout) //#define int ll #define N 600000 using namespace std; const int inf = 1e9 + 123; const ll INF = 1e18 + 123; const double pi = acos (-1.0); const ld eps = 1e-3; int n, a[N]; main () { speed; cin >> n; for (int i = 1; i <= n; i ++) { cin >> a[i]; } sort (a + 1, a + 1 + n); for (int i = 1; i <= n; i ++) { if (a[i] != a[i + 1]) { if (a[i] < n - i) cout << n - i, stop; } } } //Coded by A....

컴파일 시 표준 에러 (stderr) 메시지

hindeks.cpp:32:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main ()
       ^
#Verdict Execution timeMemoryGrader output
Fetching results...