@@ -0,0 +1,966 @@
+import java.io.*;%0Aimport java.util.*;%0Aimport java.text.*;%0Aimport java.math.*;%0Aimport java.util.regex.*;%0A%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        int trips = in.nextInt();%0A        for(int trip_i = 0; trip_i %3C trips; trip_i++) %7B%0A            int money = in.nextInt();%0A            int flavors = in.nextInt();%0A            int costs%5B%5D = new int%5Bflavors%5D;%0A            for(int cost_i = 0; cost_i %3C flavors; cost_i++) %7B%0A                costs%5Bcost_i%5D = in.nextInt();%0A            %7D%0A            for(int i = 0; i %3C flavors - 1; i++) %7B%0A                for(int j = i + 1; j %3C flavors; j++) %7B%0A                    if (costs%5Bi%5D + costs%5Bj%5D == money) %7B%0A                        System.out.print(i + 1);%0A                        System.out.print(%22 %22);%0A                        System.out.println(j + 1);%0A                        break;%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Solve Ice Cream Parlor