Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>

bool fun(int X, int Y, vector<int> &dp)
{
	if(Y == 0)
		return true;
	if (X == 0)
		return false;

	if (!dp[Y])
		return false;
	if (fun(X - 1, Y - 4, dp))
	{
		return true;
	}
	if (fun(X - 1, Y - 2,dp))
	{
		return true;
	}
	dp[Y] = false;
	return false;
}

void Sol2()
{
	int X, Y;
	cin >> X >> Y;
	vector<int>  dp(101,1);

	bool ret = fun(X, Y,dp);
	if (ret)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}
int main()
{
    //Sol1();
    Sol2();
    //Sol3();
    //Sol4();
    //Sol5();
    //Sol6();
    //cin.get();
}


Compiler output:
a.cc:8:24: error: 'vector' has not been declared
    8 | bool fun(int X, int Y, vector<int> &dp)
      |                        ^~~~~~
a.cc:8:30: error: expected ',' or '...' before '<' token
    8 | bool fun(int X, int Y, vector<int> &dp)
      |                              ^
a.cc: In function 'bool fun(int, int, int)':
a.cc:15:14: error: 'dp' was not declared in this scope
   15 |         if (!dp[Y])
      |              ^~
a.cc:17:31: error: 'dp' was not declared in this scope
   17 |         if (fun(X - 1, Y - 4, dp))
      |                               ^~
a.cc:21:30: error: 'dp' was not declared in this scope
   21 |         if (fun(X - 1, Y - 2,dp))
      |                              ^~
a.cc:25:9: error: 'dp' was not declared in this scope
   25 |         dp[Y] = false;
      |         ^~
a.cc: In function 'void Sol2()':
a.cc:32:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   32 |         cin >> X >> Y;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:33:9: error: 'vector' was not declared in this scope
   33 |         vector<int>  dp(101,1);
      |         ^~~~~~
a.cc:33:9: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:33:16: error: expected primary-expression before 'int'
   33 |         vector<int>  dp(101,1);
      |                ^~~
a.cc:35:29: error: 'dp' was not declared in this scope
   35 |         bool ret = fun(X, Y,dp);
      |                             ^~
a.cc:37:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |                 cout << "Yes" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   37 |                 cout << "Yes" << endl;
      |                                  ^~~~
      |                                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:39:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   39 |                 cout << "No" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:39:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   39 |                 cout << "No" << endl;
      |                                 ^~~~
      |                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~