답안 #384783

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
384783 2021-04-02T09:26:33 Z ngpin04 Rabbit Carrot (LMIO19_triusis) C++14
0 / 100
2 ms 364 KB
#include <bits/stdc++.h>

using namespace std;
const int N = 2e5 + 5;

int a[N];
int n,m;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    //freopen("file.inp","r",stdin);
    cin >> n >> m;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        a[i] -= i * m;
    }
    vector <int> lis(n);
    int ans = 0;
    for (int i = 1; i <= n; i++) {
        int len = lower_bound(lis.begin(), lis.end(), a[i]) - lis.begin();
        lis[len] = a[i];
        ans = max(ans, len);
    }
    cout << ans;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 2 ms 364 KB Output is correct
4 Incorrect 2 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 2 ms 364 KB Output is correct
4 Incorrect 2 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 2 ms 364 KB Output is correct
4 Incorrect 2 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 2 ms 364 KB Output is correct
4 Incorrect 2 ms 364 KB Output isn't correct
5 Halted 0 ms 0 KB -