public static void main(String[] args) { Task2 test = new Task2(); int[] A = {4, 5, 1, 1, 1, 1, 4, 3, 1}; int result = test.solution2(A); System.out.println(result); A = new int[] {1, 2, 1, 18, 91, 12}; result = test.solution(A); System.out.println(result); }
public static void main(String[] args) throws FileNotFoundException, IOException, InterruptedException { long starttime = System.currentTimeMillis(); Task1 task1 = new Task1("files\\INPUT.txt"); task1.solve(); Task2 task2 = new Task2("files\\task1.txt", "files\\task2.txt"); task2.solve(); Task3 task3 = new Task3("files\\task1.txt", "files\\task3.txt"); task3.solve(); Task4 task4 = new Task4("files\\task1.txt", "files\\task3.txt"); task4.solve(); Task5 task5 = new Task5(); task5.solve(); long endtime = System.currentTimeMillis(); }