c# 백준 9063 대지.
풀이 과정
전체 코드
class Program
{
    static void Main(string[] args)
    {
        long n = long.Parse(Console.ReadLine());
        int[] x = new int[n];
        int[] y = new int[n];
        for (int i = 0; i < n; i++)
        {
            string[] s = Console.ReadLine().Split(' ');
            x[i] = int.Parse(s[0]);
            y[i] = int.Parse(s[1]);
        }
        Console.WriteLine((x.Max() - x.Min()) * (y.Max() - y.Min()));
    }
}
 
      
댓글남기기