University stuff.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334
  1. class Main {
  2. public static void main(String[] args) {
  3. if (args.length != 1) {
  4. System.out.println("Usage: java Main <n>");
  5. System.exit(1);
  6. }
  7. NPunkter17 points = new NPunkter17(Integer.parseInt(args[0]));
  8. Oblig4 seq = new Sequential(points);
  9. Oblig4 par = new Parallel(points);
  10. Timer tseq = run(seq, null);
  11. run(par, tseq);
  12. seq.draw();
  13. par.draw();
  14. }
  15. static Timer run(Oblig4 o, Timer base) {
  16. System.out.println(o.name+": filling...");
  17. o.fill();
  18. System.out.println("Done.");
  19. Timer t = new Timer().start();
  20. o.solve();
  21. t.end();
  22. if (base == null)
  23. System.out.println(o.name+": "+t.prettyTime());
  24. else
  25. System.out.println(o.name+": "+t.prettySpeedup(base));
  26. return t;
  27. }
  28. }