Submission #431648

#TimeUsernameProblemLanguageResultExecution timeMemory
431648kwongwengVision Program (IOI19_vision)C++17
0 / 100
2 ms968 KiB
#include <bits/stdc++.h> #include "vision.h" using namespace std; void construct_network(int H, int W, int K) { vector<int> Ns; int a1 = H*W, a2 = H*W; for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ int pos = i*W + j; int a = add_not(pos); if (a == 0){ if (a1 == H*W) a1 = pos; else a2 = pos; } } } Ns = {a1, a2}; int c; if (abs(a1/W - a2/W) + abs((a1%W) - (a2%W)) == K){ c = add_and(Ns); }else{ c = add_not(a1); } return; }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:19:6: warning: variable 'c' set but not used [-Wunused-but-set-variable]
   19 |  int c;
      |      ^
#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...