import java.util.*;
public class sumpair {
public static void main(String args[]) {
Scanner scn=new Scanner (System.in);
int n=scn.nextInt();
if(n>=1&&n<1000) {
int []har=new int[n];
for(int j=0;j<n;j++)
{
har[j]=scn.nextInt();
}
int target=scn.nextInt();
int []sd=sort(har);
sumpairs(sd,target);
}
}
public static int[] sort(int []arr) {
for(int k=0;k<arr.length-1;k++)
{
for(int l=0;l<arr.length-1-k;l++)
{
if(arr[l]>arr[l+1])
{
int temp=arr[l];
arr[l]=arr[l+1];
arr[l+1]=temp;
}
}
}
return arr;
}
public static void sumpairs(int []arr,int i)
{
int r=0;
int t=0;
{
for(r=0;r<arr.length;r++)
{
for(t=0;t<arr.length;t++)
{
if(arr[r]<=arr[t])
{
if(i==(arr[r]+arr[t]))
{
System.out.println(arr[r]+" and "+arr[t]);
}
}
}
}
}}
}
It is not showing 100% this solution ?which test case i missed??