# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
205390 | my99n | Vision Program (IOI19_vision) | C++14 | 15 ms | 1272 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 <bits/stdc++.h>
#include "vision.h"
using namespace std;
int h, w;
int order (int x, int y) { return x*w+y; }
// void print (vector<int> v) { for (auto x : v) cerr << x << ' '; cerr << endl;}
void construct_network(int H, int W, int K) {
h=H; w=W;
vector<int> firstor, secondor, _and;
for (int i = 0; i < H+W-1; i++) {
vector<int> v1, v2;
for (int j = 0; j < min(i+1, W); j++) {
if (!(i-j >= H or j >= W)) v1.push_back(order(i-j, j));
if (!(i-j >= H or W-1-j >= W)) v2.push_back(order(i-j, W-1-j));
}
// cerr << "print1 "; print(v1);
// cerr << "print2 "; print(v2);
firstor.push_back(add_or(v1));
secondor.push_back(add_or(v2));
}
for (int i = 0; i < firstor.size(); i++) {
if (i+K >= firstor.size()) break;
_and.push_back(add_and({firstor[i], firstor[i+K]}));
_and.push_back(add_and({secondor[i], secondor[i+K]}));
}
int ans = add_or(_and);
}
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... |