Submission #739355

#TimeUsernameProblemLanguageResultExecution timeMemory
739355veehjFinancial Report (JOI21_financial)C++17
0 / 100
120 ms5836 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, 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; } cout << lower_bound(all(v), inf)-v.begin(); }
#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...