public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n,H,W; n = scanner.nextInt(); H = scanner.nextInt(); W = scanner.nextInt(); int[][] group = new int[n][2]; int[][] nums = new int[H + 1][W + 1]; for (int i = 0; i < n; i++) { ...