Submission #1012803

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10128032024-07-02 15:56:11ttamxWombats (IOI13_wombats)C++17
100 / 100
3044 ms196536 KiB
#include "wombats.h"
#include <bits/stdc++.h>
using namespace std;
const int N=5005;
const int M=205;
const int B=10;
const int K=1<<10;
const int INF=1e9;
int n,m,b;
int h[N][M],v[N][M];
struct Matrix:array<array<int,M>,M>{
Matrix(){
for(int i=0;i<M;i++)for(int j=0;j<M;j++)(*this)[i][j]=INF;
for(int i=0;i<M;i++)(*this)[i][i]=0;
}
friend Matrix operator*(const Matrix &a,const Matrix &b){
Matrix res;
array<array<int,M>,M> opt;
for(int i=1;i<=m;i++)opt[i][0]=1;
for(int i=1;i<=m;i++)opt[m+1][i]=m;
for(int i=m;i>=1;i--){
for(int j=1;j<=m;j++){
res[i][j]=INF;
for(int k=opt[i][j-1];k<=opt[i+1][j];k++){
int val=a[i][k]+b[k][j];
if(val<res[i][j]){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
   15 |  int res;
      |      ^~~
#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...