Example #1
0
        void Solve(StreamScanner ss, StreamWriter sw)
        {
            //---------------------------------
            var N = ss.Next(int.Parse);
            var X = ss.Next(int.Parse, N);

            var ai = X.Max();
            var aj = X.Where(x => x != ai).OrderBy(x => Math.Abs(x - ai / 2.0)).First();

            sw.WriteLine($"{ai} {aj}");
            //---------------------------------
        }