74702024-01-09 09:51:01NotYouAranycipők (45)csharpAccepted 45/4532ms23784 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/028ms20252 KiB
2Accepted0/027ms20740 KiB
3Accepted3/326ms21052 KiB
4Accepted3/326ms21300 KiB
5Accepted3/327ms21540 KiB
6Accepted3/327ms22172 KiB
7Accepted3/328ms21996 KiB
8Accepted3/328ms22440 KiB
9Accepted3/328ms22488 KiB
10Accepted3/332ms22624 KiB
11Accepted3/328ms22884 KiB
12Accepted3/328ms23136 KiB
13Accepted3/328ms23100 KiB
14Accepted3/329ms23452 KiB
15Accepted3/329ms23636 KiB
16Accepted3/328ms23692 KiB
17Accepted3/329ms23784 KiB