Submission #338086

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3380862020-12-22 12:59:46juggernautHyper-minimum (IZhO11_hyper)C++14
100 / 100
898 ms58348 KiB
#include<bits/stdc++.h>
using namespace std;
int n,m,i,j,k,l,g;
int main(){
cin>>n>>m;
int dp[5][n][n][n][n];
for(i=0;i<n;i++)
for(j=0;j<n;j++)
for(k=0;k<n;k++)
for(l=0;l<n;l++)cin>>dp[4][i][j][k][l];
for(i=0;i<n;i++)
for(j=0;j<n;j++)
for(k=0;k<n;k++)
for(l=0;l<n;l++){
dp[3][i][j][k][l]=2e9;
for(g=l;g<min(n,l+m);g++)
dp[3][i][j][k][l]=min(dp[3][i][j][k][l],dp[4][i][j][k][g]);
}
for(i=0;i<n;i++)
for(j=0;j<n;j++)
for(k=0;k<n;k++)
for(l=0;l<n;l++){
dp[2][i][j][k][l]=2e9;
for(g=k;g<min(n,k+m);g++)
dp[2][i][j][k][l]=min(dp[2][i][j][k][l],dp[3][i][j][g][l]);
}
for(i=0;i<n;i++)
for(j=0;j<n;j++)
for(k=0;k<n;k++)
for(l=0;l<n;l++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...