답안 #434081

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
434081 2021-06-20T14:47:07 Z ScarletS Vision Program (IOI19_vision) C++17
컴파일 오류
0 ms 0 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K)
{
	vector<int> v;
	for (int i=0;i<H;++i)
		for (int j=0;j<W;++j)
		{
			vector<int> w;
			for (int k=j+1;k<W;++k)
				if (k-j==K)
					w.push_back(i*W+k);
			for (int k=i+1;k<H&&k-i<=K;++k)
			{
				if (k-i==K)
					v.push_back(k*W+j);
				else
				{
					if (0<=j-K+k-i)
						v.push_back(k*W+j-K+k-i);
					if (j+K-k+i<W)
						v.push_back(k*W+j+K-k+i);
				}
			}
			if (!w.empty())
				v.push_back(add_and({i*W+j},add_or(w)));
		}
	add_or(v);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:28:42: error: too many arguments to function 'int add_and(std::vector<int>)'
   28 |     v.push_back(add_and({i*W+j},add_or(w)));
      |                                          ^
In file included from vision.cpp:1:
vision.h:10:5: note: declared here
   10 | int add_and(std::vector<int> Ns);
      |     ^~~~~~~