답안 #644934

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
644934 2022-09-25T15:18:19 Z a_aguilo Vision Program (IOI19_vision) C++14
컴파일 오류
0 ms 0 KB
#include "vision.h"
#include<bits/stdc++.h>

using namespace std;

void construct_network(int H, int W, int K) {
	int possibilities[K+1];
	memset(possibilities, 0, sizeof(possibilities));
	for(int w = 0; w <= min(K, W-1); ++w){
        int h = K - w;
        if(h >= H) continue;
        int act[2];
        act[0] = 0;
        act[1] = h*W + w;
        possibilities[w] = add_and(act);
	}
	add_or(possibilities);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:15:36: error: could not convert '(int*)(& act)' from 'int*' to 'std::vector<int>'
   15 |         possibilities[w] = add_and(act);
      |                                    ^~~
      |                                    |
      |                                    int*
vision.cpp:17:9: error: could not convert '(int*)(& possibilities)' from 'int*' to 'std::vector<int>'
   17 |  add_or(possibilities);
      |         ^~~~~~~~~~~~~
      |         |
      |         int*