71672024-01-01 16:27:54czitaAranycipők (45)csharpAccepted 45/4532ms24916 KiB
using System;
using System.Collections.Generic;
using System.Linq;


namespace AEANYCIPOK
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int max = 0;
            List<int> maxlista = new List<int>();
            int akt = 0;
            for (int i = 0; i < n; i++) 
            {
                akt = int.Parse(Console.ReadLine());
                if (akt > max)
                {
                    maxlista.Clear();
                    max = akt;
                    maxlista.Add(i+1);
                }
                else if (akt==max)
                {
                    maxlista.Add(i + 1);
                }
                            
            }
            Console.WriteLine(max);
            Console.WriteLine( maxlista.Count());
            foreach (int i in maxlista) { Console.WriteLine( i); }
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/028ms21612 KiB
2Accepted0/028ms21832 KiB
3Accepted3/328ms21952 KiB
4Accepted3/329ms22492 KiB
5Accepted3/328ms23052 KiB
6Accepted3/328ms23644 KiB
7Accepted3/329ms23836 KiB
8Accepted3/328ms23684 KiB
9Accepted3/329ms23700 KiB
10Accepted3/332ms23724 KiB
11Accepted3/330ms23980 KiB
12Accepted3/328ms24204 KiB
13Accepted3/329ms24232 KiB
14Accepted3/329ms24404 KiB
15Accepted3/330ms24624 KiB
16Accepted3/328ms24220 KiB
17Accepted3/332ms24916 KiB