[Form the biggest number challenge] I am facing Run-time error with this code, although sample testcases have passed

#include
#include
#include
using namespace std;

bool myCompare(string X, string Y){
string XY = X.append(Y);
string YX = Y.append(X);

return stoi(XY)<stoi(YX);

}

int main(){
int testcases;
cin >> testcases;

for(int k = 0;k<testcases;k++){
	int n;
	cin >> n;
	string s[n];

	for(int i = 0; i<n ; i++){
		cin >> s[i];
	}
	
	sort(s,s+n,myCompare);

	for(int i = 0;i<n;i++){
		cout<<s[i];
	}
}

}

hello @vasanthkorada999 ,

use stoll in place of stoi