# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
644378 | Karuk | Global Warming (CEOI18_glo) | C++14 | 104 ms | 18708 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
long long max(long long &a,long long &b) {return a>b?a:b;}
int main() {
long long n,x;cin>>n>>x;
long long a[n];
long long pos[n];
vector<long long>lis(n,1e18);
vector<vector<long long> >history(n,{(long long)(1e18)});
long long ans=0;
for(int i=0;i<n;i++) {
long long y;cin>>y;
long long pos=lower_bound(lis.begin(),lis.end(),y)-lis.begin();
history[pos].push_back(y);
lis[pos]=y;
ans=max(ans,pos);
}
cout<<ans<<endl;
vector<long long>revlis(n,1e18);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |