# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
362465 | MoldovanAndrei1 | Vision Program (IOI19_vision) | C++14 | 2 ms | 1128 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"
int w1;
int OP(int a , int b )
{
return a*w1+b;
}
void construct_network(int H, int W, int K) {
std::vector<int> NS;
int poz=H*W-1;
w1=W;
for(int i = 0 ; i <H;i++)
{
for(int j = 0 ; j < W; j++)
{
for(int r = 0 ; r <= K ;r++)
{
if(i + r <H)
{
if(j+(K-r)<W)
{
NS={OP(i,j),OP(i+r,j+K-r)};
int a=add_and(NS);
poz++;
}
if(j-(K-r)>=0)
{
NS={OP(i,j),OP(i+r,j-K+r)};
int a=add_and(NS);
poz++;
}
}
if(i-r>=0){
if(j+(K-r)<W)
{
NS={OP(i,j),OP(i-r,j+K-r)};
int a=add_and(NS);poz++;
}
if(j-(K-r)>=0)
{
NS={OP(i,j),OP(i-r,j-K+r)};
int a=add_and(NS);
poz++;
}}
}
}
}
NS.clear();
for(int i=H*W;i<=poz;i++)NS.push_back(i);
int b=add_or(NS);
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |