Submission #1768445


Source Code Expand

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static Scan sc = new Scan();
    static void Main()
    {
        int n = sc.Int;
        var a = sc.IntArr;
        Array.Sort(a);
        Console.WriteLine(a[n - 1] - a[0]);
    }
}
class Scan
{
    public int Int { get { return int.Parse(Str); } }
    public long Long { get { return long.Parse(Str); } }
    public double Double { get { return double.Parse(Str); } }
    public string Str { get { return Console.ReadLine().Trim(); } }
    public int[] IntArr { get { return StrArr.Select(int.Parse).ToArray(); } }
    public long[] LongArr { get { return StrArr.Select(long.Parse).ToArray(); } }
    public double[] DoubleArr { get { return StrArr.Select(double.Parse).ToArray(); } }
    public string[] StrArr { get { return Str.Split(new []{' '}, System.StringSplitOptions.RemoveEmptyEntries); } }
}

Submission Info

Submission Time
Task B - Traveling AtCoDeer Problem
User riantkb
Language C# (Mono 4.6.2.0)
Score 200
Code Size 920 Byte
Status AC
Exec Time 26 ms
Memory 13396 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 6
Set Name Test Cases
Sample s1.txt, s2.txt
All in1.txt, in2.txt, in3.txt, in4.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
in1.txt AC 26 ms 9300 KB
in2.txt AC 26 ms 13268 KB
in3.txt AC 25 ms 9300 KB
in4.txt AC 26 ms 13268 KB
s1.txt AC 26 ms 13396 KB
s2.txt AC 25 ms 9172 KB