| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 478399 | blue | Vision Program (IOI19_vision) | C++17 | 0 ms | 0 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 <vector>
using namespace std;
using a = add_and;
using o = add_or;
using pb = push_back;
int C(int H,int W,int K){
vector<int> M[450];
vector<int> O[450];
for(int i = 0; i < H*W; i++){
M[i/W+int(i%W)].pb(i);
O[i/W-int(i%W)+W-1].pb(i);
}
vector<int> P,Q,R,S,T;
for(int d=0;d<=H+W-2;d++){
P.pb(o(main_list[d]));
Q.pb(o(P));
R.pb(o(opp_list[d]));
S.pb(o(R));
if(d-K >= 0){
T.push_back(a({P[d], Q[d-K]}));
T.push_back(a({R[d], S[d-K]}));
}
}
return o(T);
}
void construct_network(int H, int W, int K){
if(K==H+W-2)C(H, W, K);
else add_xor({C(H, W, K),C(H, W, K+1)});
}
