# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
282829 | muhammad_hokimiyon | Vision Program (IOI19_vision) | C++14 | 469 ms | 1956 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 <bits/stdc++.h>
using namespace std;
int dist( int x1 , int y1 , int x2 , int y2 )
{
return abs(x1 - x2) + abs(y1 - y2);
}
void construct_network(int H, int W, int K)
{
int n = H;
int m = W;
vector < pair < int , int > > ask;
for( int i = 0; i < n; i++ ){
for( int j = 0; j < m; j++ ){
for( int h = i; h < n; h++ ){
for( int g = j; g < m; g++ ){
int x = dist( i , j , h , g );
if( x == K ){
ask.push_back({ i * m + j , h * m + g });
}
}
}
}
}
vector < int > res;
int cur = n * m;
for( auto x : ask ){
vector < int > g;
g.push_back(x.first);
g.push_back(x.second);
res.push_back( add_and( g ) );
}
vector < int > g;
for( int i = cur; i < cur + (int)g.size(); i++ )g.push_back(i);
int ans = add_or( g );
}
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... |