# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
575376 | 2022-06-10T09:44:32 Z | d4xn | Mountains (IOI17_mountains) | C++17 | 1 ms | 212 KB |
#pragma GCC optimize ("Ofast") #include "mountains.h" #include <bits/stdc++.h> using namespace std; #define ld long double #define ll long long const int N = 2002; ll n, ans; vector<pair<ll, ll>> v, taken; int maximum_deevs(vector<int> y) { n = y.size(); ans = 0; v.resize(n); for(ll i = 0; i < n; i++) { v[i] = make_pair(y[i], i); } sort(v.begin(), v.end()); for(ll i = 0; i < n; i++) { bool ok = 1; for (ll j = 0; j < taken.size(); j++) { // comprobar si se puede coger } if (ok) taken.push_back(make_pair(v[i].second, v[i].first)); } ll sz = taken.size(); return max(sz, 1ll); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |