제출 #739360

#제출 시각아이디문제언어결과실행 시간메모리
739360veehjFinancial Report (JOI21_financial)C++17
5 / 100
171 ms5564 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define F first #define S second #define pb push_back #define sz(a) (int)a.size() #define pll pair<ll, ll> #define all(x) (x).begin(), (x).end() const ll inf = 1e10; int main() { ll n, d; cin >> n >> d; vector<ll> v(n+1, inf); v[0]=-1*inf; for(ll i=0; i<n; i++){ ll x; cin >> x; ll k=upper_bound(all(v), x)-v.begin(); if(v[k-1]<x && x<v[k]) v[k]=x; } ll c=-1; for(auto& u : v) if(u<inf) c++; cout << c << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...