Files

Usage

To use this tool, you should modify your code to read input from standard in and write output to standard out. Note that this does not affect the code you submit to TopCoder for scoring -- you should only do this for offline testing. To interface with the pool, your program should read the inputs in the order they appear. When reading the positions input, you will simply read M*(N+1)*N*2 doubles. You should then compute your output and write the M*N elements to standard out. For example, you might add the following main method to your code:
int main(){
  MaintainPlanes mp;
  int M, N;
  double home_lat, home_lng, d;
  vector<double> positions;
  scanf("%d%d%lf%lf",&M,&N,&home_lat,&home_lng);
  for(int i = 0; i<M*(N+1)*N*2; i++){
    scanf("%lf",&d);
    positions.push_back(d);
  }
  vector<int> r = mp.schedule(M,N,home_lat,home_lng,positions);
  for(int i = 0; i<M*N; i++)
    printf("%d\n",r[i]);
  fflush(stdout);
}
To run the tool on the command line, execute
java -jar Tester.jar <args>
<args> may include the following Note that, in the visualization, the lines shown are the great circle paths, and will not appear as straight lines.

Finally, since your output will be sent to standard out, you may not use that for debugging purposes. Instead, you should print any debugging messages to standard error. These will be forwarded to the console.