code problem link : Problem - A - Codeforces

Regarding this problem,i have solved using brute force approach using if else statements with all possible condition i have encountered .

```
int solve()
{
int n = 3;
int arr[n];
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
ll maxi = *max_element(arr, arr + n);
ll cnt = count(arr, arr + n, maxi);
if (cnt == 3)
cout << "1" << " " << "1" << " " << "1" << endl;
else if (cnt == 2)
{
if (maxi == arr[1] and arr[2] == maxi)
{
cout << (maxi)-arr[0] + 1 << " "
<< "1"
<< " "
<< "1" << '\n';
}
if (maxi == arr[0] and arr[2] == maxi)
{
cout << "1"
<< " " << maxi - arr[1] + 1 << " "
<< "1" << '\n';
}
if (maxi == arr[1] and arr[0] == maxi)
{
cout << "1"
<< " "
<< "1"
<< " " << maxi - arr[2] << '\n';
}
}
else
{
if (maxi == arr[0])
{
cout << (maxi)-arr[0] << " " << maxi - arr[1] + 1 << " " << maxi - arr[2] + 1 << '\n';
}
if (maxi == arr[1])
{
cout << (maxi)-arr[0] + 1 << " " << maxi - arr[1] << " " << maxi - arr[2] + 1 << '\n';
}
if (maxi == arr[2])
{
cout << (maxi)-arr[0] + 1 << " " << maxi - arr[1] + 1 << " " << maxi - arr[2] << '\n';
}
}
}
int main()
{
tc
solve();
}
```

I am not find out my mistake.