Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>

#define max(x, y)	(((x) > (y))? (x) : (y))
#define abs(x)		(((x) < 0)? (-1*(x)) : (x))

using namespace std;

int N,Y;

int recur(int R, x,y,z) {
	if ((x+y+z)>N || R < 0) return 0;
	if ((x+y+z) == N && R == 0) return 1;
	if (recur(R-10000,x+1,y,z) == 1)return 1;
	if (recur(R-5000,x,y+1,z) == 1)return 1;
	if (recur(R-1000,x,y,z+1) == 1)return 1;
}

int main() {
	int x=0,y=0,z=0;
	int ans;

	cin >> N >> Y;
	
	if (recur(Y,x,y,z) == 0) {
		x = y = z = -1;
	}
	
	cout << x << y << z << endl;

	return 0;
}


Compiler output:
a.cc:13:18: error: 'x' has not been declared
   13 | int recur(int R, x,y,z) {
      |                  ^
a.cc:13:20: error: 'y' has not been declared
   13 | int recur(int R, x,y,z) {
      |                    ^
a.cc:13:22: error: 'z' has not been declared
   13 | int recur(int R, x,y,z) {
      |                      ^
a.cc: In function 'int recur(int, int, int, int)':
a.cc:14:14: error: 'x' was not declared in this scope
   14 |         if ((x+y+z)>N || R < 0) return 0;
      |              ^
a.cc:14:16: error: 'y' was not declared in this scope
   14 |         if ((x+y+z)>N || R < 0) return 0;
      |                ^
a.cc:14:18: error: 'z' was not declared in this scope
   14 |         if ((x+y+z)>N || R < 0) return 0;
      |                  ^
a.cc:15:14: error: 'x' was not declared in this scope
   15 |         if ((x+y+z) == N && R == 0) return 1;
      |              ^
a.cc:15:16: error: 'y' was not declared in this scope
   15 |         if ((x+y+z) == N && R == 0) return 1;
      |                ^
a.cc:15:18: error: 'z' was not declared in this scope
   15 |         if ((x+y+z) == N && R == 0) return 1;
      |                  ^
a.cc:16:27: error: 'x' was not declared in this scope
   16 |         if (recur(R-10000,x+1,y,z) == 1)return 1;
      |                           ^
a.cc:16:31: error: 'y' was not declared in this scope
   16 |         if (recur(R-10000,x+1,y,z) == 1)return 1;
      |                               ^
a.cc:16:33: error: 'z' was not declared in this scope
   16 |         if (recur(R-10000,x+1,y,z) == 1)return 1;
      |                                 ^
a.cc:17:26: error: 'x' was not declared in this scope
   17 |         if (recur(R-5000,x,y+1,z) == 1)return 1;
      |                          ^
a.cc:17:28: error: 'y' was not declared in this scope
   17 |         if (recur(R-5000,x,y+1,z) == 1)return 1;
      |                            ^
a.cc:17:32: error: 'z' was not declared in this scope
   17 |         if (recur(R-5000,x,y+1,z) == 1)return 1;
      |                                ^
a.cc:18:26: error: 'x' was not declared in this scope
   18 |         if (recur(R-1000,x,y,z+1) == 1)return 1;
      |                          ^
a.cc:18:28: error: 'y' was not declared in this scope
   18 |         if (recur(R-1000,x,y,z+1) == 1)return 1;
      |                            ^
a.cc:18:30: error: 'z' was not declared in this scope
   18 |         if (recur(R-1000,x,y,z+1) == 1)return 1;
      |                              ^
a.cc:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^