NZEC in ENTEXAM

I’m getting an NZEC in[https://www.codechef.com/problems/ENTEXAM](http://Problem ENTEXAM)

Here is my code:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Collections;

    public class Codechef {
        public static void main(String[] args) throws IOException {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            long t = Long.parseLong(br.readLine());
            long n,k,e,m;
            while((t--)!=0) {
                String inp1 = br.readLine();
                n = Long.parseLong(inp1.split(" ")[0]); // no of students
                k = Long.parseLong(inp1.split(" ")[1]); // the maximal number of students who will get enrolled
                e = Long.parseLong(inp1.split(" ")[2]); // total number of entrance exams
                m = Long.parseLong(inp1.split(" ")[3]); // maximal number of points for a single exam
                Long[] scores = new Long[(int)n - 1];
                for(int i=0;i<scores.length;i++) {
                    scores[i] = 0L;
                }
                for(int j=0;j<n-1;j++) {
                    inp1 = br.readLine();
                    long sc = 0;
                    for (int i = 0; i < e; i++)  {
                        sc += Long.parseLong(inp1.split(" ")[i]);
                    }
                    scores[j] += sc;
                }
                long sergey = 0;
                inp1 = br.readLine();
                for(int i=0;i<inp1.split(" ").length;i++) {
                    sergey += Long.parseLong(inp1.split(" ")[i]);
                }
                Arrays.sort(scores, Collections.<Long>reverseOrder());
                long ans = Math.max(0,scores[(int)k-1] + 1 - sergey);
                if(ans<=m) {
                    System.out.println(ans);
                } else {
                    System.out.println("Impossible");
                }
            }

        }
    }

What is wrong with it?