| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1361593 | tarjanmici | Global Warming (CEOI18_glo) | C++20 | 2094 ms | 1960 KiB |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n, x;
cin>>n>>x;
vector<int> t(n+1);
for(int i=1;i<=n;i++) cin>>t[i];
int ans=0;
for(int i=1;i<=n;i++){
vector<int> dp(n+1, INT_MAX);
int curr=0;
for(int j=1;j<=n;j++){
int val=t[j];
if(j<=i)val-=x;
int c=lower_bound(dp.begin(), dp.end(), val)-dp.begin();
dp[c]=val;
curr=max(curr, c+1);
}
ans=max(ans, curr);
}
cout<<ans<<'\n';
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
