Esempio n. 1
0
 public static void main(String[] args) {
   InputStream inputStream;
   try {
     inputStream = new FileInputStream(args[0]);
   } catch (IOException e) {
     throw new RuntimeException(e);
   }
   OutputStream outputStream;
   try {
     outputStream = new FileOutputStream("output.txt");
   } catch (IOException e) {
     throw new RuntimeException(e);
   }
   InputReader in = new InputReader(inputStream);
   OutputWriter out = new OutputWriter(outputStream);
   TaskC solver = new TaskC();
   int testCount = Integer.parseInt(in.next());
   for (int i = 1; i <= testCount; i++) solver.solve(i, in, out);
   out.close();
 }
Esempio n. 2
0
  @Override
  public List<Object> run() {
    System.out.println(Thread.currentThread() + " taskA run start:" + childrenList.size());
    System.out.println("taskA run start:" + waitCount.get());

    List<Object> result = new ArrayList<>();

    List<Object> listB = taskB.getResult();
    List<Object> listC = taskC.getResult();

    result.add(listB);
    result.add(listC);

    try {
      Thread.sleep(200);
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    System.out.println("taskA run end");

    return result;
  }