# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1031599 | Marco_Escandon | Vision Program (IOI19_vision) | C++17 | 10 ms | 2264 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;
typedef int ll;
ll sol(ll k, vector<ll> a, vector<ll> b)
{
vector<ll> temp1, temp2;
for(int i=0; i<=a.size()-k; i++)
{
vector<ll> sub_vectora(a.begin() + i, a.begin() + i+k);
vector<ll> sub_vectorb(b.begin() + i, b.begin() + i+k);
temp1.push_back(add_and({add_not(add_xor(sub_vectora)),add_or(sub_vectora)}));
temp2.push_back(add_and({add_not(add_xor(sub_vectorb)),add_or(sub_vectorb)}));
}
return add_and({add_or(temp1),add_or(temp2)});
}
void construct_network(int H, int W, int K) {
vector<vector<ll>> ia(H+W-1), da(H+W-1);
vector<ll>iaor,daor;
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
ia[i+j].push_back(i*W+j);
da[i-j+W-1].push_back(i*W+j);
}
}
for(auto i:ia) if(i.size()>0) iaor.push_back(add_or(i));
for(auto i:da) if(i.size()>0) daor.push_back(add_or(i));
ll ans=add_and({sol(K+1,iaor,daor),add_not(sol(K,iaor,daor))});
}
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... |