1851 - Bridge Coverage Systems
Posted: Wed May 30, 2012 11:45 pm
Code: Select all
using System;
namespace _1851_Bridge_Coverage_Systems
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int[] towers = new int[n];
int may = int.MinValue;
for (int i = 0; i < n; i++)
{
int h = int.Parse(Console.ReadLine());
towers[i] = h;
if (h > may)
{
may = h;
}
}
foreach (int x in towers)
{
Console.WriteLine(may - x);
}
}
}
}