Submission #928738

# Submission time Handle Problem Language Result Execution time Memory
928738 2024-02-17T03:23:26 Z Juanchoki Cave (IOI13_cave) C++14
Compilation error
0 ms 0 KB
#include"cave.h"
#include <bits/stdc++.h>
using namespace std;
/*
int S[1<<20], D[1<<20];
int N; 
int tryCombination(int comb[])
{
	for (int i = 0; i < N; i++)
		if (S[i] != comb[i]) 	
			return i;
	return -1;
}
*/
void exploreCave(int N)
{
	int arr[N];
	for (int i = 0; i < N; i++)
		arr[i] = 0;
	int last = 0;
	while (last < N)
	{
		int temp = tryCombination(arr);
		if (temp == -1)
		{
			answer(arr);
		}
		if (temp == last)
		{	
			arr[last++] = 1;
			continue;
		} 
		last = temp;
	}
}

Compilation message

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:26:14: error: too few arguments to function 'void answer(int*, int*)'
   26 |    answer(arr);
      |              ^
In file included from cave.cpp:1:
cave.h:9:6: note: declared here
    9 | void answer(int S[], int D[]);
      |      ^~~~~~