Biggest number problem question

#include
#include
#include
using namespace std;
//void mybiggest(int* d1,int* d2);
int main()
{

int T;
cin>>T;
while(T--){
int n;
cin>>n;
vector <int> v;
for(int i=0;i<n;i++)
    {
        int temp;
        cin>>temp;
        v.push_back(temp);
    }
for(int k=0;k<n-1;k++)
{
    for(int x=0;x<n-1-k;x++)
    {
          string s1=to_string(v[x]);
string s2=to_string(v[x+1]);
string k1=s1+s2;
string k2=s2+s1;
int c1=stoi(k1);
int c2=stoi(k2);
if(c1<c2)
{
    int temp=v[x];
	v[x]=v[x+1];
	v[x+1]=temp;
	
}

    }

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

}
my testcases are not passed .
even my answers are coming right.
what’s the problem.

@anujkurmi hey anuj your forgeting to put endline .your code is running for t times and each time your output comes in separate line so put endl