package no077; import java.util.Scanner; public class Main { public static final int MAX = 300; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[MAX]; for(int i=0;i= b[k]) { x += a[k] - b[k]; }else{ y += b[k] - a[k]; } } if (x < y) { continue; } ans = Math.min(ans, x); } System.out.println(ans); } }