Submission #934945

#TimeUsernameProblemLanguageResultExecution timeMemory
934945tamir1Global Warming (CEOI18_glo)C++14
10 / 100
44 ms7764 KiB
#include<bits/stdc++.h> #define ll long long using namespace std; ll i,n,x,a[200005]; set<ll> s; set<ll> ::iterator it; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> x; for(i=1;i<=n;i++) cin >> a[i]; for(i=1;i<=n;i++){ it=s.lower_bound(a[i]); if(it!=s.end()) s.erase(it); s.insert(a[i]); } cout << s.size(); }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...