Submission #389624

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3896242021-04-14 10:09:15mariowongCollecting Stamps 3 (JOI20_ho_t3)C++14
100 / 100
188 ms328644 KiB
#include <bits/stdc++.h>
using namespace std;
struct stamps{
long long d,t;
}a[205];
long long dp[205][205][205][5],n,l,ans;
int main(){
ios::sync_with_stdio(false);
cin >> n >> l;
for (int i=1;i<=n;i++){
cin >> a[i].d;
}
for (int i=1;i<=n;i++){
cin >> a[i].t;
}
for (int i=0;i<=n+1;i++){
for (int j=0;j<=n+1;j++){
for (int k=0;k<=n;k++){
dp[i][j][k][0]=dp[i][j][k][1]=1e18;
}
}
}
a[n+1].d=l;
dp[0][n+1][0][0]=dp[0][n+1][0][1]=0;
for (int i=0;i<=n;i++){
for (int j=n+1;j>i;j--){
for (int k=0;k<=max(0LL,n-j+1)+i;k++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...