Submission #169925

#TimeUsernameProblemLanguageResultExecution timeMemory
169925nandonathanielVision Program (IOI19_vision)C++14
0 / 100
19 ms2140 KiB
#include "vision.h" #include "bits/stdc++.h" using namespace std; int nolsemua(vector<int> v){ return add_not(add_or(v)); } int bersebelahan(vector<int> v){ vector<int> atau; for(int i=1;i<v.size();i++){ atau.push_back(add_and({v[i-1],v[i]})); } return add_or(atau); } vector<int> baris(int h,int w){ vector<int> ret; for(int i=0;i<h;i++){ vector<int> v; for(int j=0;j<w;j++)v.push_back(i*w+j); ret.push_back(add_xor(v)); } return ret; } vector<int> kolom(int h,int w){ vector<int> ret; for(int j=0;j<w;j++){ vector<int> v; for(int i=0;i<h;i++)v.push_back(i*w+j); ret.push_back(add_xor(v)); } return ret; } void construct_network(int H, int W, int K) { int x=add_and({nolsemua(baris(H,W)),bersebelahan(kolom(H,W))}); int y=add_and({nolsemua(kolom(H,W)),bersebelahan(baris(H,W))}); add_or({x,y}); }

Compilation message (stderr)

vision.cpp: In function 'int bersebelahan(std::vector<int>)':
vision.cpp:11:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=1;i<v.size();i++){
              ~^~~~~~~~~
#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...