Submission #778736

#TimeUsernameProblemLanguageResultExecution timeMemory
778736jasminVision Program (IOI19_vision)C++17
0 / 100
10 ms1616 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K){ //find_nums vector<int> xorh(H); for(int i=0; i<H; i++){ vector<int> ns; for(int j=0; j<W; j++){ ns.push_back(i*W + j); } xorh[i] = add_xor(ns); } vector<int> bitsh(20); for(int i=0; i<20; i++){ bitsh[i] = add_xor(xorh); for(int j=0; j<H; j++){ if((j>>i)%2==0){ xorh[i] = add_xor({xorh[i], xorh[i]}); } } } vector<int> xorw(W); for(int i=0; i<W; i++){ vector<int> ns; for(int j=0; j<H; j++){ ns.push_back(j*W + i); } xorw[i] = add_xor(ns); } vector<int> bitsw(20); for(int i=0; i<20; i++){ bitsw[i] = add_xor(xorw); for(int j=0; j<W; j++){ if((j>>i)%2==0){ xorw[j] = add_xor({xorw[j], xorw[j]}); } } } return; // add vector<int> bits; int carry=xorw[0]; for(int i=0; i<20; i++){ bits[i] = add_xor({bitsw[i], bitsh[i], carry}); carry = add_or({add_and({bitsw[i], bitsh[i]}), add_and({bitsw[i], carry}), add_and({bitsh[i], carry})}); } // compare vector<int> bitsk(20); for(int i=0; i<20; i++){ bitsk[i] = (K>>i)%2; } vector<int> same(20); for(int i=0; i<20; i++){ same[i] = add_not(add_xor({bits[i], bitsk[i]})); } add_and(same); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...