35752023-03-01 08:56:48tothgergelyInverziócsharpWrong answer 3/50577ms110496 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());
            int[] v = Console.ReadLine().Split().Select(int.Parse).ToArray();
            List<int> l = new List<int>();
            int a = 0; int b = 0;
            for (int i = 0; i < n; i++)
            {
                l.Add(v[i]);
            }
            l.Sort();
            a = l[0]; b = l[n - 1];
            if (b - a == 0)
            {
                Console.WriteLine("-1");
            }
            else
            {
                Console.WriteLine(a + " " + b);
            }
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base3/50
1Accepted0/032ms22556 KiB
2Wrong answer0/076ms31796 KiB
3Accepted1/132ms23196 KiB
4Accepted2/239ms24220 KiB
5Wrong answer0/739ms24800 KiB
6Wrong answer0/282ms33064 KiB
7Wrong answer0/2481ms107944 KiB
8Time limit exceeded0/2551ms108568 KiB
9Time limit exceeded0/2577ms109032 KiB
10Time limit exceeded0/2551ms109304 KiB
11Time limit exceeded0/2568ms109524 KiB
12Time limit exceeded0/2535ms108028 KiB
13Time limit exceeded0/2560ms110200 KiB
14Time limit exceeded0/2549ms110164 KiB
15Wrong answer0/2481ms110136 KiB
16Time limit exceeded0/2564ms110124 KiB
17Time limit exceeded0/2560ms109996 KiB
18Time limit exceeded0/2560ms110024 KiB
19Wrong answer0/3483ms110012 KiB
20Wrong answer0/3472ms110036 KiB
21Wrong answer0/2463ms110064 KiB
22Time limit exceeded0/2561ms109944 KiB
23Time limit exceeded0/2550ms110048 KiB
24Wrong answer0/2435ms110496 KiB