제출 #1220537

#제출 시각아이디문제언어결과실행 시간메모리
1220537TsotneSVGlobal Warming (CEOI18_glo)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; /*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣿⠛⣿⠀⠀⠀⠀⣤⣿⢻⡇⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣿⡛⠀⣤⣿⣿⣤⣤⣿⣿⣤⢸⡇⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀ ⠀⠀⠀⠀⠀⠀⠀⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡗⠀ ⢠⣼⣿⣿⣿⣿⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⢸⣿⣿⡟⠛⠛⢿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣿⣿⣿⣿⣤⣤⣼⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠋ */ #define fi first #define se second #define pb push_back #define ins insert #define sz(a) (int)(a.size()) #define all(x) (x).begin(),(x).end() typedef long long ll; typedef pair<int,int> pii; typedef vector<int> vi; void print(){cout<<'\n';} template<class h,class...t> void print(const h&v,const t&...u){cout<<v<<' ',print(u...);} //#define ONLINE_JUDGE #ifndef ONLINE_JUDGE #include "debug.h" #else #define debug(...) #endif //const int mod = 1e9+7; //const int mod = 998244353; const int MAXN=2e5+5; const ll inf=2e9,INF=1e18; int n,d,t[MAXN],l[MAXN]; void solve(int tc = 0){ cin>>n>>d; int ans = 1; vi dp(n+1,inf),dpR(n+1,inf); dp[0] = -inf; dpR[0] = -inf; for(int i=1;i<=n;i++) { cin>>t[i]; int lis = (--lower_bound(all(dp),t[i])) - dp.begin(); dp[lis+1] = min(dp[lis+1],t[i]); l[i] = lis + 1; } for(int i=n;i>0;i--) { if(dp[i] != inf) ans = max(ans,i); int R = (--lower_bound(all(dpR),-(t[i]-d))) - dpR.begin(); ans = max(ans,l[i] + R); int lis = (--lower_bound(all(dpR),-t[i])) - dpR.begin(); dpR[lis+1] = min(dpR[lis+1],-t[i]); } print(ans); } signed main(){ ios_base::sync_with_stdio(false); cin.tie(0); int tc=1; //cin>>tc; for(int t = 0; t < tc; t++) solve(t); }

컴파일 시 표준 에러 (stderr) 메시지

glo.cpp:27:10: fatal error: debug.h: No such file or directory
   27 | #include "debug.h"
      |          ^~~~~~~~~
compilation terminated.