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>
#define fr first
#define sc second
//#define int long long
#define all(s) s.begin(), s.end()
#define rc(s) return cout << s, 0
using namespace std;
vector <int> bit_pos, tz;
void construct_network(int H, int W, int K) {
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
tz.push_back(i * W + j);
}
bit_pos.push_back(add_xor(tz));
tz = {bit_pos.back()};
}
tz.clear();
for(int i=0;i<W;i++){
for(int j=0;j<H;j++){
tz.push_back(j * W + i);
}
bit_pos.push_back(add_xor(tz));
tz = {bit_pos.back()};
}
vector <int> ans;
for(int i=0;i<=8;i++){
if(K & (1 << i)){
ans.push_back(add_xor(bit_pos));
}
else{
ans.push_back(add_not(add_xor(bit_pos)));
}
tz.clear();
int last = bit_pos.back();
for(auto it : bit_pos){
tz.push_back(add_and({it, last}));
last = add_xor({it, last});
}
bit_pos = tz;
}
add_and(ans);
}
# | 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... |