# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
602886 | alirezasamimi100 | Vision Program (IOI19_vision) | C++17 | 10 ms | 1784 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;
#define pb push_back
const int N = 405;
vector<int> rd[N],ld[N],ans,unans;
int r[N],l[N],pl[N],pr[N],an,unan;
void construct_network(int H, int W, int K) {
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
rd[i+j].pb(i*W+j);
ld[i-j+W-1].pb(i*W+j);
}
}
for(int i=H+W-2; i>=0; i--){
r[i]=add_or(rd[i]);
l[i]=add_or(ld[i]);
if(i==H+W-2){
pl[i]=l[i];
pr[i]=r[i];
}else{
pl[i]=add_or({pl[i+1],l[i]});
pr[i]=add_or({pr[i+1],r[i]});
}
if(i+K<H+W-1){
ans.pb(add_and({l[i],l[i+K]}));
ans.pb(add_and({r[i],r[i+K]}));
# | 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... |