# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147084 | Bodo171 | Vision Program (IOI19_vision) | C++14 | 14 ms | 2012 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 "vision.h"
#include <iostream>
using namespace std;
const int nmax=1005;
vector<int> d1[nmax],d2[nmax];
int wh1[nmax],wh2[nmax],ps1[nmax],ps2[nmax];
int nr,n,m,i,j;
int enc(int i,int j)
{
return m*i+j;
}
int solve(int k)
{
vector<int> arg;
for(i=k;i<=n+m-2;i++)
arg.push_back(add_and({wh1[i],ps1[i-k]}));
for(i=k;i<=n+m-2;i++)
arg.push_back(add_and({wh2[i],ps2[i-k]}));
return add_or(arg);
}
void construct_network(int H, int W, int K) {
vector<int> Ns;
nr=H*W-1;
n=H,m=W;
for(i=0;i<H;i++)
for(j=0;j<W;j++)
{
d1[i+j].push_back(enc(i,j));
d2[j-i+H-1].push_back(enc(i,j));
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |