Submission #851735

#TimeUsernameProblemLanguageResultExecution timeMemory
851735TrumlingFinancial Report (JOI21_financial)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define F first #define S second #define enter cout<<'\n'; #define INF 999999999999 #define MOD 1000000007 #define all(x) x.begin(),x.end() int main() { ll n,d; cin>>n>>d; ll x; ll ans=0; vector<int>v; for(int i=0;i<n;i++) { cin>>x; if(!v.size() || v[v.size()-1]<x) v.pb(x); else { ll pos=lower_bound(all(v),x)-v.begin(); v[pos]=x; } } cout<<v.size();

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:18:8: warning: unused variable 'ans' [-Wunused-variable]
   18 |     ll ans=0;
      |        ^~~
Main.cpp:31:19: error: expected '}' at end of input
   31 |     cout<<v.size();
      |                   ^
Main.cpp:14:1: note: to match this '{'
   14 | {
      | ^