Submission #586619

#TimeUsernameProblemLanguageResultExecution timeMemory
586619Omar_Elgedawy동굴 (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
// #include "grader.c"
using namespace std;
#define cin(vec)        for(auto& i : vec) cin >> i
#define cout(vec)       for(auto& i : vec) cout << i << " "; cout << "\n";
#define fast            ios::sync_with_stdio(0);cin.tie(0);
#define loop(i,a,b)     for (int i = a; i < b; i++)
#define F               first
#define S               second
#define pb(n)           push_back(n)
#define pf(n)           push_front(n)
#define dci(d)          fixed<<setprecision(d)
#define sp              ' '
#define el              '\n'
#define all(v)          v.begin(),v.end()
// #define int             long long
#define try             tryCombination
int swich[5001];
void exploreCave(int n) {
	int doors[n];
	for(int i=0;i<n;i++){
		doors[i]=i;
	}
	for(int i=0;i<n;i++){
		int x=try(swich);
		if(x==-1){
			answer(swich,doors);
		}
		else{
			swich[x]^=1;
		}
	}
	answer(swich,doors);
}

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:17:25: error: 'tryCombination' was not declared in this scope
   17 | #define try             tryCombination
      |                         ^~~~~~~~~~~~~~
cave.cpp:25:9: note: in expansion of macro 'try'
   25 |   int x=try(swich);
      |         ^~~
cave.cpp:27:4: error: 'answer' was not declared in this scope
   27 |    answer(swich,doors);
      |    ^~~~~~
cave.cpp:33:2: error: 'answer' was not declared in this scope
   33 |  answer(swich,doors);
      |  ^~~~~~