Submission #282791

#TimeUsernameProblemLanguageResultExecution timeMemory
282791medmdgVision Program (IOI19_vision)C++14
0 / 100
2 ms1148 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K){ int m,m1; bool ff=false; bool fff=false; for(int i=0;i<H*W;i++){ vector<int> a; for(int j=i;j<i+10;j++){ a.push_back(j); } if(add_or(a)){ for(int j=i;j<i+10;j++){ if(add_not(j)==0){ if(ff){ m1=j; fff=true; break; }else{ m=j; ff=true; } } } } if(fff) break; } int x=m%W; int y=m/W; int xx=m1%W; int yy=m1/W; if(abs(x-xx)+abs(y-yy)==K){ vector<int> h; h.push_back(m); add_or(h); return; } add_not(m); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:5:11: warning: 'm1' may be used uninitialized in this function [-Wmaybe-uninitialized]
    5 |     int m,m1;
      |           ^~
#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...