# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1012803 | ttamx | Wombats (IOI13_wombats) | C++17 | 3044 ms | 196536 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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]){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |