Submission #424066

# Submission time Handle Problem Language Result Execution time Memory
424066 2021-06-11T16:00:39 Z madlogic Vision Program (IOI19_vision) C++17
0 / 100
1000 ms 836 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K) {
  int cur = H * (W - 1) + W - 1;
  vector<int> v;
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      for (int k = 0; k < H; k++) {
        for (int x = 0; x < W; x++) {
          int xx = i * W + j;
          int yy = k * W + x;
          if ((abs(i - k) + abs(j - x) == K)) {
            ++cur;
            v.push_back(cur);
          }
        }
      }
    }
  }
  if (!v.empty())
    add_or(v);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:12:15: warning: unused variable 'xx' [-Wunused-variable]
   12 |           int xx = i * W + j;
      |               ^~
vision.cpp:13:15: warning: unused variable 'yy' [-Wunused-variable]
   13 |           int yy = k * W + x;
      |               ^~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1091 ms 836 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB WA in grader: Invalid index
2 Halted 0 ms 0 KB -