74712024-01-09 09:51:28NotYouAranycipők (45)csharpAccepted 45/4530ms24416 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace arany_cipok
{
    class Program
    {
        static void Main(string[] args)
        {
            int j = int.Parse(Console.ReadLine());
            int[] g = new int[j];
            int lg = 0;
            int a = 0;
            int[] s = new int[j];
            List<int> l = new List<int>();

            for (int i = 0; i < j; i++)
            {
                g[i] = int.Parse(Console.ReadLine());
                if (g[i]>lg)
                {
                    lg = g[i];
                }
            }

            for (int i = 0; i < j; i++)
            {
                if (lg == g[i])
                {
                    a++;
                    l.Add(i + 1);
                }
            }
            Console.WriteLine(lg);
            Console.WriteLine(a);
            foreach (var item in l)
            {
                Console.WriteLine(item);
            }
            //Console.WriteLine(string.Join("\r\n", l));
            Console.ReadLine();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/027ms20444 KiB
2Accepted0/028ms20688 KiB
3Accepted3/327ms21292 KiB
4Accepted3/326ms21556 KiB
5Accepted3/327ms21964 KiB
6Accepted3/327ms22184 KiB
7Accepted3/327ms22792 KiB
8Accepted3/327ms22892 KiB
9Accepted3/327ms22992 KiB
10Accepted3/328ms23032 KiB
11Accepted3/328ms23196 KiB
12Accepted3/328ms23568 KiB
13Accepted3/328ms23388 KiB
14Accepted3/328ms23928 KiB
15Accepted3/330ms24412 KiB
16Accepted3/329ms24416 KiB
17Accepted3/330ms24300 KiB