| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 949970 | vjudge1 | Rabbit Carrot (LMIO19_triusis) | C++17 | 26 ms | 5188 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <vector>
#include <string>
#include <algorithm>
#include <iostream>
using namespace std;
using ll = int64_t;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, m; cin >> n >> m;
vector<int> a(n);
for (int& x : a) cin >> x;
vector<ll> v;
for (ll i = 0, x; i < n; i++) {
x = 1LL * m * (i + 1) - a[i]; // b[i]
if (x < 0) continue;
if (v.empty() or x >= v.back()) v.push_back(x);
else *lower_bound(v.begin(), v.end(), x + 1) = x;
}
cout << n - v.size() << endl;
}| # | 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... | ||||
