답안 #970237

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
970237 2024-04-26T08:56:38 Z vjudge1 Rabbit Carrot (LMIO19_triusis) C++17
0 / 100
1 ms 1116 KB
#include<bits/stdc++.h>

using namespace std;

int main()
{
    int m,n,a[200001];
    cin>>n>>m;
    for(int i=0;i<n;++i)
    {
        cin>>a[i];
        a[i] = -a[i];
    }
    vector<int> v;
    for(int i=0;i<n;++i)
    {
        auto it = upper_bound(v.begin(),v.end(),a[i]);
        if(v.empty() || it == v.end())
        {
            v.push_back(i);
        }
        else
        {
            *it = a[i];
        }
    }
    int ans = v.size()-1;
    if(-a[0]>m) ans = n;
    cout<<ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1116 KB Output is correct
2 Correct 1 ms 1116 KB Output is correct
3 Correct 1 ms 1116 KB Output is correct
4 Incorrect 1 ms 1116 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1116 KB Output is correct
2 Correct 1 ms 1116 KB Output is correct
3 Correct 1 ms 1116 KB Output is correct
4 Incorrect 1 ms 1116 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1116 KB Output is correct
2 Correct 1 ms 1116 KB Output is correct
3 Correct 1 ms 1116 KB Output is correct
4 Incorrect 1 ms 1116 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1116 KB Output is correct
2 Correct 1 ms 1116 KB Output is correct
3 Correct 1 ms 1116 KB Output is correct
4 Incorrect 1 ms 1116 KB Output isn't correct
5 Halted 0 ms 0 KB -