35962023-03-01 09:33:55tothgergelyInverziócsharpWrong answer 3/50598ms61304 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
base3/50
1Accepted0/037ms24136 KiB
2Wrong answer0/090ms36188 KiB
3Accepted1/135ms24900 KiB
4Accepted2/241ms26140 KiB
5Wrong answer0/741ms26404 KiB
6Wrong answer0/293ms37560 KiB
7Time limit exceeded0/2587ms60644 KiB
8Time limit exceeded0/2573ms54768 KiB
9Time limit exceeded0/2597ms54444 KiB
10Time limit exceeded0/2589ms58776 KiB
11Time limit exceeded0/2598ms55436 KiB
12Time limit exceeded0/2586ms58728 KiB
13Time limit exceeded0/2582ms59896 KiB
14Time limit exceeded0/2574ms60040 KiB
15Time limit exceeded0/2584ms60808 KiB
16Time limit exceeded0/2560ms55688 KiB
17Time limit exceeded0/2579ms57496 KiB
18Time limit exceeded0/2597ms60128 KiB
19Time limit exceeded0/3584ms61304 KiB
20Time limit exceeded0/3584ms58956 KiB
21Time limit exceeded0/2555ms59116 KiB
22Time limit exceeded0/2588ms60404 KiB
23Time limit exceeded0/2597ms58848 KiB
24Time limit exceeded0/2575ms59540 KiB