# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
167249 | 2019-12-07T01:21:14 Z | sans | Hindeks (COCI17_hindeks) | C++14 | 154 ms | 2296 KB |
#include <cstdio> #include <algorithm> #include <vector> using namespace std; int main(int argc, char **argv){ int N; scanf("%d", &N); vector<int> h(N); for(auto &x: h) scanf("%d", &x); sort(h.begin(), h.end()); for(int i = h.back(); i >= 0; --i){ auto itr = lower_bound(h.begin(), h.end(), i); if(h.end() - itr == i){ printf("%d\n", i); break; } } return 0; } //cikisir
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Output isn't correct |
2 | Correct | 4 ms | 376 KB | Output is correct |
3 | Incorrect | 2 ms | 376 KB | Output isn't correct |
4 | Incorrect | 2 ms | 376 KB | Output isn't correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
6 | Incorrect | 2 ms | 376 KB | Output isn't correct |
7 | Correct | 4 ms | 376 KB | Output is correct |
8 | Correct | 28 ms | 760 KB | Output is correct |
9 | Incorrect | 154 ms | 2296 KB | Output isn't correct |
10 | Correct | 61 ms | 1400 KB | Output is correct |