Solution for Mock CCC '20 Contest 1 J1 - A Rage Tree Problem in Java 8


Feb. 11, 2020 63.658272 seconds Java 8
import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
    		Scanner in = new Scanner(System.in);
		
		int[] nums = new int[4];
		for(int i = 0; i < 4; i++) {
			nums[i] = in.nextInt();
		}
		Arrays.sort(nums);
		System.out.println(nums[0]);
		System.out.println(nums[3]);
    }
}

Editorial


No editorial for this problem. :(

Original Problem


You can view the original page for this problem on the DMOJ.