syntax - Runtime Error Message Java -


while doing usaco problem, got following runtime error message not know problem code fix error message. have tested , wrote own system , prints out output file correctly error message still exists. error message follows:

runtime error or memory limit exceeded on sample input case -- details below output file bteams.out: [file missing!]

the correct answer: 1

the following appeared on standard error: [file missing!]

import java.io.bufferedwriter; import java.io.file; import java.io.filewriter; import java.io.ioexception; import java.io.inputstreamreader; import java.io.printwriter; import java.util.arrays; import java.util.scanner;   public class bteams {      public static void main(string[] args) throws ioexception {         file file = new file("bteams.in");         scanner scan = new scanner(file);         printwriter pw = new printwriter(new bufferedwriter(new filewriter("bteams.out")));         int input [] = new int [12];         for(int = 0; < 12; i++)         {             input[i] = scan.nextint();         }         scan.close();         arrays.sort(input);          int sums [] = new int[4];          sums[0] = input[11] + input[0] + input[6];         sums[1] = input[10] + input[1] + input[5];         sums[2] = input[9] + input[4] + input[3];         sums[3] = input[8] + input[7] + input[2];          int largest = sums[0];         int smallest = sums[0];         for(int j = 1; j < 3; j++)         {             if(sums[j]> sums[j-1])             {                 largest = sums[j];             }             else if(sums[j] < sums[j-1])             {                 smallest = sums[j];             }         }          //system.out.println(largest-smallest);         pw.println(largest-smallest);         pw.flush();         pw.close();       }   } 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -