답안 #865621

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
865621 2023-10-24T12:34:15 Z Lib Vision Program (IOI19_vision) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
vector <int> RowHasBlack;
vector <int> ColumnHasBlack;
vector <int> temp;
	
void construct_network(int H, int W, int K){
	RowHasBlack.clear();
	ColumnHasBlack.clear();
	for(int i=0;i<H;i++){
		temp.clear();
		for(int k=0;k<W;k++){
			temp.push_back(i*W+k);
		}
		if(add_or(temp)){
			RowHasBlack.push_back(i);
		}
	}
	for(int i=0;i<W;i++){
		temp.clear();
		for(int k=0;k<H;k++){
			temp.push_back(k*W+i);
		}
		if(add_or(temp)){
			ColumnHasBlack.push_back(i);
		}
	}
	OutputAns;
}

int OutputAns(){
	if(RowHasBlack.size()==2&&ColumnHasBlack.size()==2){
		return ( (RowHasBlack[1]-RowHasBlack[0])  + (ColumnHasBlack[1]-ColumnHasBlack[0]==K) );
	}else{
		return 0;
	}
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:29:2: error: 'OutputAns' was not declared in this scope
   29 |  OutputAns;
      |  ^~~~~~~~~
vision.cpp: In function 'int OutputAns()':
vision.cpp:34:85: error: 'K' was not declared in this scope
   34 |   return ( (RowHasBlack[1]-RowHasBlack[0])  + (ColumnHasBlack[1]-ColumnHasBlack[0]==K) );
      |                                                                                     ^