제출 #364787

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3647872021-02-10 03:30:20cpp219Collecting Stamps 3 (JOI20_ho_t3)C++14
100 / 100
1877 ms85404 KiB
#include <bits/stdc++.h>
#define ll int
#define ld long double
#define fs first
#define sc second
using namespace std;
const ll N = 200 + 3;
const ll inf = 1e9 + 7;
typedef pair<int,int> LL;
ll n,lens,a[N],dp[N][N][N][2],lim[N];
ll ans;
struct Node{
ll val,L,R,p,lr;
};
bool operator < (Node a,Node b){
return a.val > b.val;
}
priority_queue<Node> pq;
ll Ask(ll L,ll R){
return lens - a[L] + a[R];
}
void Minimize(ll L,ll R,ll p,ll lr,ll val){
if (dp[L][R][p][lr] <= val) return; ans = max(ans,p);
//cout<<L<<" "<<R<<" "<<p<<" "<<lr<<"x\n";
dp[L][R][p][lr] = val; pq.push({val,L,R,p,lr});
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

ho_t3.cpp: In function 'void Minimize(int, int, int, int, int)':
ho_t3.cpp:26:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   26 |     if (dp[L][R][p][lr] <= val) return; ans = max(ans,p);
      |     ^~
ho_t3.cpp:26:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   26 |     if (dp[L][R][p][lr] <= val) return; ans = max(ans,p);
      |                                         ^~~
ho_t3.cpp: In function 'int main()':
ho_t3.cpp:55:25: warning: unused variable 'nxtR' [-Wunused-variable]
   55 |         ll nxtL = L - 1,nxtR = R + 1;
      |                         ^~~~
ho_t3.cpp:38:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   38 |         freopen(task".INP","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
ho_t3.cpp:39:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   39 |         freopen(task".OUT","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...