Submission #431673

#TimeUsernameProblemLanguageResultExecution timeMemory
431673kwongwengVision Program (IOI19_vision)C++17
12 / 100
5 ms1020 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; 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 = 0; k <= K; k++){ int new_pos = pos + k*W + K-k; if (i+k < H && j+K-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:16:10: warning: unused variable 'a' [-Wunused-variable]
   16 |      int a = add_and(Ns);
      |          ^
vision.cpp:7:6: warning: unused variable 'a1' [-Wunused-variable]
    7 |  int a1 = H*W, a2 = H*W;
      |      ^~
vision.cpp:7:16: warning: unused variable 'a2' [-Wunused-variable]
    7 |  int a1 = H*W, a2 = H*W;
      |                ^~
vision.cpp:24:6: warning: unused variable 'a' [-Wunused-variable]
   24 |  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...