Problem Code HIT

Please can someone tell me whatis the problem with my code. New user, thanks.
/* package codechef; // don’t place package name! */

import java.util.;
import java.lang.
;
import java.io.*;

/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//test cases
String s;
String g=“”;
char ii;
int n,d=0,j,temp=0,k,x,y;
int t=Integer.parseInt(br.readLine());
for(int i=0;i<t;i++)
{
//N
n=Integer.parseInt(br.readLine());
int arr[]=new int[n];
Arrays.fill(arr,0);
s=br.readLine();
for(j=0;j<s.length();j++)
{
ii=s.charAt(j);
if(ii!=32)
{
arr[d]=arr[d]*10+Integer.parseInt(String.valueOf(ii));

            }
            else
            {
                d++;
            }
        }
         for(x=0;x<n;x++)
        {
            for(y=x+1;y<n;y++)
            {
                if(arr[y]<arr[x])
                {
                    temp=arr[y];
                    arr[y]=arr[x];
                    arr[x]=temp;    
                }
            }
        }
        
        int lim1=3*n/4;
        
       
        k=n/4;
        if(arr[lim1]>arr[n/2] && arr[n/2]>arr[n/4])
        {
            for(i=0;i<3;i++)
            {
                g=g+ arr[k]+" ";
                k=k+n/4;
           
            }
        }
        else
        g=g+" -1";
        g=g+ "\n";
    }
    System.out.println(g);
}

}

Please either format your code or link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

1 Like

I applaud you for the unrivaled horrible quality of this post. No statement for your questions. Sure.

1 Like