Submission #134338

#TimeUsernameProblemLanguageResultExecution timeMemory
134338arthurconmyCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
 
#ifndef ARTHUR_LOCAL
	#include "cave.h"
#endif
 
int combo[n];
int D[n];

void exploreCave(int n)
{
	for(int i=0; i<n; i++) D[i]=i;
 
	for(int i=0; i<n; i++)
	{
		int cur = tryCombination(combo);
		if(cur==i) combo[i]=1-combo[i];
		
      	if(cur==-1) answer(combo,D);
    }
 
	answer(combo, D);
}

Compilation message (stderr)

cave.cpp:8:11: error: 'n' was not declared in this scope
 int combo[n];
           ^
cave.cpp:8:11: note: suggested alternative: 'yn'
 int combo[n];
           ^
           yn
cave.cpp:9:7: error: 'n' was not declared in this scope
 int D[n];
       ^
cave.cpp:9:7: note: suggested alternative: 'yn'
 int D[n];
       ^
       yn
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:13:25: error: 'D' was not declared in this scope
  for(int i=0; i<n; i++) D[i]=i;
                         ^
cave.cpp:17:28: error: 'combo' was not declared in this scope
   int cur = tryCombination(combo);
                            ^~~~~
cave.cpp:17:28: note: suggested alternative: 'wctomb'
   int cur = tryCombination(combo);
                            ^~~~~
                            wctomb
cave.cpp:20:33: error: 'D' was not declared in this scope
        if(cur==-1) answer(combo,D);
                                 ^
cave.cpp:23:9: error: 'combo' was not declared in this scope
  answer(combo, D);
         ^~~~~
cave.cpp:23:9: note: suggested alternative: 'wctomb'
  answer(combo, D);
         ^~~~~
         wctomb
cave.cpp:23:16: error: 'D' was not declared in this scope
  answer(combo, D);
                ^