제출 #856393

#제출 시각아이디문제언어결과실행 시간메모리
856393Trisanu_DasVision Program (IOI19_vision)C++17
컴파일 에러
0 ms0 KiB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
 
void construct_network(int h, int w, int k){
	int total = h * w;
	for(int i = 0; i < h * w; i++){
      for(int j = i + 1; j < h * w; j++){
          if(abs(i / w - j / w) + abs(i % w - j % w) == K){
              add_and({i, j});
              total++;
          }
      }
    }
	vector<int> ans;
	for(int i = h * w; i < total; i++) ans.push_back(i);
	add_or(ans);
}

컴파일 시 표준 에러 (stderr) 메시지

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:9:57: error: 'K' was not declared in this scope
    9 |           if(abs(i / w - j / w) + abs(i % w - j % w) == K){
      |                                                         ^