Submission #316389

#TimeUsernameProblemLanguageResultExecution timeMemory
316389kylych03Vision Program (IOI19_vision)C++14
44 / 100
45 ms2420 KiB
#include "vision.h" #include <bits/stdc++.h> //#include "grader.cpp" using namespace std; void construct_network(int H, int W, int K) { vector<int> vec; if(K==1){ for(int i = 0 ; i < H; i++ ){ for(int j = 0 ; j < W; j++){ if( i + 1 < H ){ int p1 = i*W + j; int p2 = (i+1)*W + j; vector <int> v; v.push_back(p1); v.push_back(p2); vec.push_back( add_and(v) ); } if( j + 1 < W ){ int p1 = i*W + j; int p2 = i*W + j+1; vector <int> v; v.push_back(p1); v.push_back(p2); vec.push_back( add_and(v) ); } } } } else for(int i = 0 ; i < H; i++ ){ for(int j = 0 ; j < W; j++){ vector <int> v,v1; for(int t = i; t< H; t++) for(int p = 0 ; p < W; p++) if(abs (t - i) + abs(p - j) == K){ int p2 = t*W + p; v.push_back(p2); } int p1 = i*W + j; v1.push_back(p1); if(v.size()== 0) continue; v1.push_back( add_or(v)); vec.push_back( add_and(v1) ); } } add_or(vec); //add_not(c); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:30:5: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   30 |     else
      |     ^~~~
vision.cpp:48:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   48 |  add_or(vec);
      |  ^~~~~~
#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...