Submission #934810

#TimeUsernameProblemLanguageResultExecution timeMemory
934810tamir1Global Warming (CEOI18_glo)C++14
0 / 100
39 ms3952 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.upper_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...