# Chef swap digits(please tell why code is not working)

#include<bits/stdc++.h>

using namespace std;

int twotwo(int arr[],int arr1[])
{
return max(((10arr[0])+arr[1]+(10arr1[0])+arr1[1]),max(((10arr[0])+arr1[1]+(10arr1[0])+arr[1]),max(((10arr1[0])+arr[1]+(10arr[0])+arr1[1]),max(((10arr[0])+arr1[0]+(10arr[1])+arr1[1]),((10arr1[1])+arr[1]+(10arr1[0])+arr[0])))));
}

int oneone(int arr[],int arr1[])
{
return arr[1]+arr1[1];
}

int onetwo(int arr[],int arr1[])
{
return max((arr[1]+arr1[0]*10+arr1[1]),max((arr1[1]+arr1[0]10+arr[1]),(arr1[0]+10arr[1]+arr1[1])));
}
int main()
{
int t=0;
cin>>t;
while(tâ€“)
{
int a,b;
cin>>a>>b;
int arr[2]={0};
int arr1[2]={0};
/*while(a!=0)
{
int i=1;
arr[i]=a%10;
a=a/10;

``````		i--;
}*/
arr[1]=a%10;
a=a/10;
arr[0]=a%10;
arr1[1]=b%10;
b=b/10;
arr1[0]=b%10;
/*while(b!=0)
{
int i=1;
arr1[i]=b%10;
b=b/10;

i--;
}*/
//cout<<arr[0]<<" "<<arr[1]<<" "<<arr1[0]<<" "<<arr1[1]<<endl;
if(arr[0]!=0&&arr1[0]!=0)
{
cout<<twotwo(arr,arr1)<<endl;
continue;
}
if(arr[0]==0&&arr1[0]==0)
{
cout<<oneone(arr,arr1);
continue;
}
if(arr[0]==0)
{

cout<<onetwo(arr,arr1)<<endl;
continue;
}
if(arr1[0]==0)
{
cout<<onetwo(arr1,arr)<<endl;
}

}
return 0;
``````

}