# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
389424 | 2021-04-14T04:32:24 Z | SirCovidThe19th | Rabbit Carrot (LMIO19_triusis) | C++14 | 1 ms | 292 KB |
#include <bits/stdc++.h> using namespace std; int main() { //poles, max leap int n, m; cin >> n >> m; vector<int> seq; for (int i = 1; i <= n; i++){ int a; cin >> a; seq.push_back(m*i-a); } multiset<int> dp; for (int i = 0; i < seq.size(); i++){ auto pos = dp.lower_bound(seq[i]); dp.insert(seq[i]); if (pos != dp.end()) dp.erase(pos); } cout<<n-dp.size(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Incorrect | 1 ms | 292 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Incorrect | 1 ms | 292 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Incorrect | 1 ms | 292 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Incorrect | 1 ms | 292 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |