39162023-03-05 14:42:55czitaAranycipők (45)csharpAccepted 45/4534ms25176 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace arany
{
    class Program
    {
      
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int max = 0;
            List<int> mlist = new List<int>();
            int akt;
            for (int i = 0; i < N; i++)
            {
                akt = int.Parse(Console.ReadLine());
                if (akt>max)
                {
                    mlist.Clear();
                    mlist.Add(i + 1);
                    max = akt;
                }
                else if (akt==max)
                {
                    mlist.Add(i + 1);
                }
            }
            mlist.Sort();
            Console.WriteLine(max);
            Console.WriteLine(   mlist.Count());
            foreach (var item in mlist)
            {
                Console.WriteLine(item);
            }
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/029ms21392 KiB
2Accepted0/032ms22056 KiB
3Accepted3/328ms21920 KiB
4Accepted3/328ms22512 KiB
5Accepted3/328ms22860 KiB
6Accepted3/329ms23108 KiB
7Accepted3/329ms23996 KiB
8Accepted3/328ms23976 KiB
9Accepted3/328ms23820 KiB
10Accepted3/334ms24484 KiB
11Accepted3/329ms24072 KiB
12Accepted3/329ms24096 KiB
13Accepted3/332ms24568 KiB
14Accepted3/332ms24408 KiB
15Accepted3/332ms25148 KiB
16Accepted3/332ms24876 KiB
17Accepted3/334ms25176 KiB