제출 #419691

#제출 시각아이디문제언어결과실행 시간메모리
419691Sasha008Financial Report (JOI21_financial)C++17
0 / 100
31 ms6684 KiB
#include<bits/stdc++.h> using namespace std; long long a,b,c,d,n,m,g,i,j,k0,k1,k2,k3,f,k,l,r,o,p,t,y,mx=-1e18,mx1=-1e18,mx2=-1e18,q,q1,q2,mn=1e18,mn1=1e18,mn2=1e18,INF=1e18; long long A[200005]; long long dp[200005]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>n>>d; for(i=1;i<=n;i++) { cin>>A[i]; } for(i=1;i<=n;i++) { if (n<=7000||d==1) { f=max(a-a+1,i-d); mx2=-1e18; for(j=i-1;j>=f;j--) { if (A[i]>A[j]) dp[i]=max(dp[i],dp[j]+1); } dp[i]=max(dp[i],1ll); mx=max(mx,dp[i]); } else { } } cout<<mx; } //10 1 //1 1 2 2 2 2 2 2 3 3 //numeric_limits<long long>::3min()
#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...