| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1194087 | Hamed_Ghaffari | Rabbit Carrot (LMIO19_triusis) | C++20 | 16 ms | 1476 KiB |
#include <bits/stdc++.h>
using namespace std;
int32_t main() {
cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
vector<int> dp;
int n, m;
cin >> n >> m;
for(int i=1, x; i<=n; i++) {
cin >> x;
if(i*m-x>=0) {
int pos = upper_bound(dp.begin(), dp.end(), i*m-x)-dp.begin();
if(pos == dp.size()) dp.push_back(0);
dp[pos] = i*m-x;
}
}
cout << n - int(dp.size()) << '\n';
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
