@@ -0,0 +1,1261 @@
+/*%0AID: yashary1%0ALANG: JAVA%0ATASK: beatsbysuprimoforallofmypeoplenegroesandlatinoes%0A*/%0A%0Aimport java.io.*;%0Aimport java.util.*;%0A%0A%0Aclass skidesign%0A%7B%0A%09public static void main(String args%5B%5D) throws IOException%0A%09%7B%0A%09%09BufferedReader f = new BufferedReader(new FileReader(%22skidesign.in%22));%0A    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(%22skidesign.out%22)));%0A%0A    int N = Integer.parseInt((new StringTokenizer(f.readLine())).nextToken());%0A%0A    int elevation%5B%5D = new int%5B1000%5D;%0A    for(int i = 0; i %3C N; i++)%0A    %7B%0A    %09elevation%5Bi%5D = Integer.parseInt((new StringTokenizer(f.readLine())).nextToken());%0A    %7D%0A%0A    int minCost = 1000000;%0A    for(int i = 1; i %3C= 100; i++)%0A    %7B%0A    %09int currentCost = cost(i, elevation, N);%0A    %09if(currentCost %3C minCost) minCost = currentCost;%0A    %7D%0A%0A    out.println(minCost);%0A%0A    out.close();%0A%09%7D%0A%0A%09private static int cost(int minHeight, int elevation%5B%5D, int N)%0A%09%7B%0A%09%09int totalCost = 0;%0A%09%09int maxHeight = minHeight + 17;%0A%0A%09%09for(int i = 0; i %3C N; i++)%0A%09%09%7B%0A%09%09%09if(elevation%5Bi%5D %3C minHeight)%0A%09%09%09%7B%0A%09%09%09%09totalCost += (minHeight - elevation%5Bi%5D) * (minHeight - elevation%5Bi%5D);%0A%09%09%09%7D%0A%0A%09%09%09if(elevation%5Bi%5D %3E maxHeight)%0A%09%09%09%7B%0A%09%09%09%09totalCost += (elevation%5Bi%5D - maxHeight) * (elevation%5Bi%5D - maxHeight);%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09return totalCost;%0A%09%7D%0A%7D%0A

Create skidesign.java