java runtime error

I used java to do the “Mixtures” problem in “medium” type ones…used recursion…am getting runtime error…it works perfectly on my desktop …using netbeans…here is the code

package mixtures;
import java.io.*;
import java.util.*;

class Mixtures {

    Integer n;
    Integer[] a;
    int ma;
    int mb;
    int ab;
    int smoke;
    static int temp;
    
    public void mix(int i,int j,int size){
        
        if(size != 1){
            for(i=0,j=i+1;i<size-1 && j<size;i++,j++){
                ab = (a[i]+a[j])%100;
                temp += a[i]*a[j];
                a[i] = ab;
                //shift
                for(int k=j+1;k<size;k++){
                    a[k-1] = a[k];
                }
                size--;
                mix(i,j,size);
            }
        }
        else{
            if(temp < smoke){
                smoke = temp;
            }
        }
        
    }
    
    public void enterValues(){
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            n = Integer.parseInt(line);
            a = new Integer[n];
            
            line = br.readLine();
            String[] arr = line.split(" ");
            int i = 0;
            for(String v : arr){
                a[i] = Integer.parseInt(v);
                i++;
            }
        }catch(Exception e){
            e.printStackTrace();
        }
    }
    
    public static void main(String[] args) {
        // TODO code application logic here
        Mixtures m = new Mixtures();
        m.enterValues();
        m.smoke = 100000;
        m.temp = 0;
        m.mix(0,0,m.n);
        System.out.println(m.smoke);
    }
}

same problem is happening for many of my other programs. am getting a runtime error

In fact, the problem is with compilation.

You cannot use package on CodeChef :wink:

ok thnx …but now am getting wrong answer…any sample test cases for which this code is wrong …

//