35882023-03-01 09:15:59tothgergelyInverziócsharpWrong answer 3/50568ms111096 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 (a - b == 0 && b - a == 0)
            {
                Console.WriteLine("-1");
            }
            else
            {
                Console.WriteLine(a + " " + b);
            }
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base3/50
1Accepted0/034ms22504 KiB
2Wrong answer0/075ms31048 KiB
3Accepted1/132ms22824 KiB
4Accepted2/239ms23884 KiB
5Wrong answer0/741ms24172 KiB
6Wrong answer0/283ms32564 KiB
7Wrong answer0/2490ms107916 KiB
8Time limit exceeded0/2568ms108200 KiB
9Time limit exceeded0/2559ms108768 KiB
10Time limit exceeded0/2547ms109048 KiB
11Time limit exceeded0/2565ms108956 KiB
12Time limit exceeded0/2537ms108140 KiB
13Time limit exceeded0/2560ms109920 KiB
14Time limit exceeded0/2560ms109952 KiB
15Wrong answer0/2474ms110088 KiB
16Time limit exceeded0/2568ms110156 KiB
17Time limit exceeded0/2546ms110428 KiB
18Time limit exceeded0/2544ms110672 KiB
19Wrong answer0/3472ms110764 KiB
20Wrong answer0/3476ms110664 KiB
21Wrong answer0/2470ms110648 KiB
22Time limit exceeded0/2560ms110624 KiB
23Time limit exceeded0/2550ms110752 KiB
24Wrong answer0/2458ms111096 KiB