36072023-03-01 10:06:03tothgergelyMorze (60 pont)csharpRuntime error 0/6032ms25276 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ahanem
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            SortedSet<int> l = new SortedSet<int>();
            int[] v  = Console.ReadLine().Split().Select(int.Parse).ToArray();
            for (int i = 0; i < n; i++)
            {
                l.Add(v[i]);
            }
            if (l.Min - l.Max == 0 && l.Max - l.Min == 0)
            {
                Console.WriteLine("-1");
            }
            else
            {
                Console.WriteLine(l.Min + " " + l.Max);
            }
            Console.ReadKey();
        }

    }
}
SubtaskSumTestVerdictTimeMemory
base0/60
1Runtime error0/032ms21780 KiB
2Runtime error0/030ms22756 KiB
3Runtime error0/330ms23168 KiB
4Runtime error0/329ms23404 KiB
5Runtime error0/329ms23960 KiB
6Runtime error0/330ms23864 KiB
7Runtime error0/330ms23980 KiB
8Runtime error0/329ms24372 KiB
9Runtime error0/429ms24676 KiB
10Runtime error0/429ms24524 KiB
11Runtime error0/429ms25028 KiB
12Runtime error0/730ms24924 KiB
13Runtime error0/729ms25244 KiB
14Runtime error0/829ms25276 KiB
15Runtime error0/828ms25036 KiB