Form biggest number problem

None of the test cases have been passes by this code but when i put custom input, i get the right answer.
#include<bits/stdc++.h>
using namespace std;
bool compare(string x,string y)
{
return x>y;
}
int main() {
int t,n;
cin>>t;
while(t–)
{
cin>>n;
string a[100];
for(int i=0;i<n;i++)
cin>>a[i];
sort(a,a+n,compare);
for(int i=0;i<n;i++)
cout<<a[i];
cout<<endl;
}
return 0;
}

Now it’s working https://ide.codingblocks.com/s/306412, your comparator function was incorrect.