Submission #480548

# Submission time Handle Problem Language Result Execution time Memory
480548 2021-10-17T02:12:09 Z Deepesson Rabbit Carrot (LMIO19_triusis) C++17
0 / 100
1 ms 204 KB
#include <bits/stdc++.h>

int main()
{
    int N,T;
    std::cin>>N>>T;
    int array[N];for(auto&x:array)std::cin>>x;
    std::vector<int> pilha;pilha.push_back(0);
    for(int i=0;i!=N;++i){
        int x=array[i];
        auto it=std::upper_bound(pilha.begin(),pilha.end(),x-T);
        if(it==pilha.end()){
            pilha.push_back(x);
        }else *it=x;
    }
    std::cout<<(pilha.size()-1)<<"\n";
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -