35892023-03-01 09:18:14tothgergelyInverziócsharpWrong answer 3/50569ms109580 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());
            List<int> l = new List<int>();
            l = Console.ReadLine().Split().Select(int.Parse).ToList();
            int a = 0; int b = 0;
            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/032ms22644 KiB
2Wrong answer0/072ms30424 KiB
3Accepted1/132ms23140 KiB
4Accepted2/239ms24412 KiB
5Wrong answer0/739ms24392 KiB
6Wrong answer0/282ms31936 KiB
7Wrong answer0/2476ms107760 KiB
8Time limit exceeded0/2564ms108004 KiB
9Time limit exceeded0/2569ms108372 KiB
10Time limit exceeded0/2544ms108952 KiB
11Time limit exceeded0/2542ms109012 KiB
12Time limit exceeded0/2544ms107152 KiB
13Time limit exceeded0/2538ms108796 KiB
14Time limit exceeded0/2555ms109296 KiB
15Wrong answer0/2474ms109164 KiB
16Time limit exceeded0/2546ms108880 KiB
17Time limit exceeded0/2532ms49824 KiB
18Time limit exceeded0/2541ms109516 KiB
19Wrong answer0/3470ms109428 KiB
20Wrong answer0/3481ms109356 KiB
21Wrong answer0/2481ms109236 KiB
22Time limit exceeded0/2556ms109516 KiB
23Time limit exceeded0/2561ms109580 KiB
24Wrong answer0/2446ms109368 KiB