Submission #431676

#TimeUsernameProblemLanguageResultExecution timeMemory
431676kwongwengVision Program (IOI19_vision)C++17
33 / 100
7 ms1092 KiB
#include <bits/stdc++.h> #include "vision.h" using namespace std; void construct_network(int H, int W, int K) { vector<int> Ns; int cnt = 0; for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ int pos = i*W + j; for (int k = -K; k <= K; k++){ int new_pos = pos + k*W + K-abs(k); if (0 <= i+k && i+k < H && 0 <= (j+K-abs(k)) && j+K-abs(k) < W){ Ns = {pos, new_pos}; int a = add_and(Ns); cnt++; } } } } Ns = {}; for (int i = H*W; i < H*W+cnt; i++) Ns.push_back(i); int a = add_or(Ns); return; }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:15:10: warning: unused variable 'a' [-Wunused-variable]
   15 |      int a = add_and(Ns);
      |          ^
vision.cpp:23:6: warning: unused variable 'a' [-Wunused-variable]
   23 |  int a = add_or(Ns);
      |      ^
#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...