Submission #1064914

#TimeUsernameProblemLanguageResultExecution timeMemory
1064914Ahmed57Vision Program (IOI19_vision)C++17
100 / 100
16 ms2008 KiB
#include "bits/stdc++.h" using namespace std; #include "vision.h" void construct_network(int H, int W, int K){ for(int i = 0;i<H;i++){ vector<int> v; for(int j = 0;j<W;j++){ v.push_back(i*W+j); } int val = add_xor(v); } for(int j = 0;j<W;j++){ vector<int> v; for(int i = 0;i<H;i++){ v.push_back(i*W+j); } int val = add_xor(v); } int init = H*W; for(int i = 0;i<H;i++){ vector<int> v; v.push_back(init+i); if(i)v.push_back(init+H+W+i-1); int val = add_xor(v); } init = H*W+H; for(int i = 0;i<W;i++){ vector<int> v; v.push_back(init+i); if(i)v.push_back(init+H+W+i-1); int val = add_xor(v); } init = H*W+H+W; int val = add_not(init); vector<int> bits; for(int i = 0;i<10;i++){ bits.push_back(add_and({val,init})); } for(int i = 0;i<H+W;i++){ vector<int> nbits; vector<int> lol = {init+i}; for(int i = 0;i<10;i++){ int val2 = add_and(lol); nbits.push_back(add_xor({val2,bits[i]})); lol.push_back(bits[i]); } bits=nbits; } vector<int> nbits; for(int i = 0;i<10;i++){ if(K&(1<<i)){ nbits.push_back(bits[i]); }else nbits.push_back(add_not(bits[i])); } val = add_and(nbits); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:11:13: warning: unused variable 'val' [-Wunused-variable]
   11 |         int val = add_xor(v);
      |             ^~~
vision.cpp:18:13: warning: unused variable 'val' [-Wunused-variable]
   18 |         int val = add_xor(v);
      |             ^~~
vision.cpp:25:13: warning: unused variable 'val' [-Wunused-variable]
   25 |         int val = add_xor(v);
      |             ^~~
vision.cpp:32:13: warning: unused variable 'val' [-Wunused-variable]
   32 |         int val = add_xor(v);
      |             ^~~
#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...