| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1341576 | vjudge1 | Rabbit Carrot (LMIO19_triusis) | C++17 | 66 ms | 5056 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
long long m;
cin >> n >> m;
vector<long long> c;
c.push_back(0);
for(int i = 1; i <= n; i++){
long long a;
cin >> a;
long long b = a - (long long)i * m;
if(b <= 0) c.push_back(-b);
}
vector<long long> t;
for(auto x : c){
auto it = upper_bound(t.begin(), t.end(), x);
if(it == t.end()) t.push_back(x);
else *it = x;
}
cout << n - ((int)t.size() - 1) << endl;
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... | ||||
