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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
void construct_network ( int H, int W, int K )
{
vi ind, cool;
for ( int i = 0; i < H; i++ )
{
for ( int j = 0; j < W; j++ )
{
ind.clear();
for ( int x = 0; x < H; x++ )
for ( int y = 0; y < W; y++ )
if ( abs ( i - x ) + abs ( j - y ) == K )
ind.push_back ( x*W + y );
if ( !ind.empty() )
{
int aux = add_or ( ind );
ind.clear();
ind.push_back ( aux );
ind.push_back ( i*W + j );
cool.push_back ( add_and ( ind ) );
}
}
}
add_or ( cool );
}
# | 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... |