제출 #456230

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4562302021-08-06 09:17:29astoriaVisiting Singapore (NOI20_visitingsingapore)C++14
100 / 100
368 ms196388 KiB
#include <bits/stdc++.h>
using namespace std;
int main(){
int k,n,m,a,b;
cin >> k >> n >> m >> a >> b;
int v[k+5];
for (int i=1; i<=k; i++) cin >> v[i];
int day[n+5];
for (int i=1; i<=n; i++) cin >> day[i];
int ord[m+5];
for (int i=1; i<=m; i++) cin >> ord[i];
int dp[2][m+5][2];
for (int i=0; i<2; i++){
for (int j=0; j<m+5; j++){
dp[i][j][0] = -1e9 - 200;
dp[i][j][1] = -1e9 - 200;
}
}
dp[0][0][0] = 0;
dp[0][0][1] = 0;
dp[1][0][0] = 0;
dp[1][0][1] = 0;
int storage[n+5][m+5];
for (int i=0; i<(m+5); i++) storage[0][i] = max(dp[0][i][0],dp[0][i][1]);
/*for (int i=1; i<=n; i++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...