Language: C++

#include<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
#include <iomanip>
#include <utility>
using namespace std;
using ll = long long;
typedef pair <int, int> pii;

//void kansuu(int n, string t)
//{
//	if (n == len)
//	{
//		//cout << t << endl;
//
//		int z = 0;
//		string u,v;
//		//cout << stoll(t) << endl;
//		while (1)
//		{
//			if (z==t.length()-1)
//			{
//				u += t[z];
//				//cout << "last sum+=" << stoll(u) << endl;
//
//				sum += stoll(u);
//				return;
//			}
//			else if (t[z] == 'a')
//			{
//				//cout <<"sum+="<< stoll(u) << endl;
//
//				sum += stoll(u);
//				z++;
//				u = v;
//				/*u = t[z];
//				z++;*/
//			}
//			else
//			{
//				u += t[z];
//			z++;
//			}
//		}
//
//		return;
//	}
//	/*sum += stoll(t);
//	cout << stoll(t) << endl;
//*/
//	t += s[n];
//	//t = "aaaaaaa";
//	/*sum += stoll(t);
//	cout << stoll(t) << endl;
//
//	t = s[n];*/
//	kansuu(n + 1, t);
//	//t += "a";
//	if (n!=s.length()-1)
//	{
//
//	t += "a";
//	kansuu(n + 1, t);
//	}
//	return;
//}
ll a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, ans = 0;
	ll P[11];
	ll C[11];
void kansuu(ll score, ll num, ll (&solved)[11], ll solveNum)
{
	for (d = 1; d <= a; d++)
	{
		//cout << "solved[d]=" << solved[d] << endl;
	}
	while (score<b&&P[solveNum]>solved[solveNum])
	{
		score += solveNum * 100;
		solved[solveNum]++;
		num++;
		//cout << "ccccccccccccc" << endl;
		//cout << "score=" << score << endl;
	}
	if (P[solveNum]==solved[solveNum])
	{
		score += C[solveNum];
		/*cout << "aaaaaaaaaaaaa" << endl;
		cout << "solveNum=" << solveNum << endl;
		cout << "score=" << score << endl;
		cout << "num=" << num << endl;
		cout << "solved[solveNum]=" << solved[solveNum] << endl;
*/
	}
	if (score>=b)
	{
		//cout << "num=" << num << endl;
		//cout << "l=" << l << endl;
		//cout << "score=" << score << endl;
		//cout <<"solveNum="<< solveNum << endl;

		l = min(l,num);
		return;
	}
	ll copy[11] = { 0 };
	memcpy(copy, solved, sizeof(ll) * 11);
	for (int i = 1; i <= a; i++)
	{
		if (solved[i]==0)
		{
			kansuu(score, num, solved, i);
			memcpy( solved, copy, sizeof(ll) * 11);

		}
	}




	return;
}
int main()
{

	//int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0;
	//cout << LONG_MAX << endl;
	//long long n, A[1000000000];
	ll n, m, q;
	//int   y[100001], z[100001], x[10001] = {};
	//pii y[100001];
	//pair<int, float> pii[100001];
	string s;
	//cin >> s;
	//x = s[0];
	//x = '0';
	cin >> a;
	cin >> b;
	ll sol[11] = { 0 };
	for (c = 1; c <= a; c++)
	{
		cin >> P[c];
		cin >> C[c];
	}
	l = 100000000;
	for (c = 1; c <= a; c++)
	{
		//cout << "bbbbbbbbbbbbbbbbbbbbb" << endl;
		for ( d = 1; d <= a; d++)
		{
			//cout << "P[c]=" << P[d] << endl;
			//cout << "C[c]=" << C[d] << endl;
			//cout << "sol[c]=" << sol[d] << endl;

		}
		//kansuu(0, 0, (&sol)[11], c);
		for ( d = 1; d <= a; d++)
		{
			sol[d] = 0;
		}
		kansuu(0, 0, sol, c);
	}
	

	////std::cout << std::fixed;
	//cout << std::setprecision(20) << << endl;
	//cout << d+1 << endl;
	//cout << "" << endl;
	cout << l << endl;

	return 0;
}

Compiler output:
a.cc: In function 'void kansuu(ll, ll, ll (&)[11], ll)':
a.cc:109:9: error: 'memcpy' was not declared in this scope
  109 |         memcpy(copy, solved, sizeof(ll) * 11);
      |         ^~~~~~
a.cc:10:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include <utility>
  +++ |+#include <cstring>
   10 | using namespace std;