Submission #579190

#TimeUsernameProblemLanguageResultExecution timeMemory
579190VanillaVision Program (IOI19_vision)C++17
100 / 100
15 ms1716 KiB
#include <bits/stdc++.h> #include "vision.h" using namespace std; void construct_network(int H, int W, int K) {int op=0;vector<int>row,col;vector<int>T;vector<int>v;for(int i=0;i<H;i++){for(int j=0;j<W;j++){v.push_back(i*W+j);}T.push_back(add_xor(v));v={T.back()};}for(int j=0;j<W;j++){for(int i=0;i<H;i++){v.push_back(i*W+j);}T.push_back(add_xor(v));v={T.back()};}int last=T.back();vector<int>rs;for(int i=0;i<9;i++){rs.push_back(add_xor(T));if(K&(1<<i))rs[i]=add_not(rs[i]);vector<int>hl;int now=last;for(int i:T){hl.push_back(add_and({now,i}));now=add_xor({now,i});}T=hl;}add_not(add_or(rs));}

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:4:50: warning: unused variable 'op' [-Wunused-variable]
    4 | void construct_network(int H, int W, int K) {int op=0;vector<int>row,col;vector<int>T;vector<int>v;for(int i=0;i<H;i++){for(int j=0;j<W;j++){v.push_back(i*W+j);}T.push_back(add_xor(v));v={T.back()};}for(int j=0;j<W;j++){for(int i=0;i<H;i++){v.push_back(i*W+j);}T.push_back(add_xor(v));v={T.back()};}int last=T.back();vector<int>rs;for(int i=0;i<9;i++){rs.push_back(add_xor(T));if(K&(1<<i))rs[i]=add_not(rs[i]);vector<int>hl;int now=last;for(int i:T){hl.push_back(add_and({now,i}));now=add_xor({now,i});}T=hl;}add_not(add_or(rs));}
      |                                                  ^~
#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...