36402023-03-01 13:25:31BenedekVizeskannákcsharpRuntime error 0/4029ms25888 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace késés
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] szm = Console.ReadLine().Split().Select(int.Parse).ToArray();
            Dictionary<int, long> k = new Dictionary<int, long>();
            int hely = 1; 
            for (int i = 0; i < N; i++)
            {
                if (!k.ContainsKey(szm[i]))
                {
                    k.Add(szm[i], 0);
                }
                k[szm[i]] = i;
            }
            var x = k.ToList();
            var y = x.Min(X => X.Value);
            Console.WriteLine(y + 1);
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Runtime error0/029ms20744 KiB
2Runtime error0/028ms21136 KiB
3Runtime error0/128ms21380 KiB
4Runtime error0/129ms21908 KiB
5Runtime error0/128ms21960 KiB
6Runtime error0/128ms22020 KiB
7Runtime error0/129ms22428 KiB
8Runtime error0/128ms22820 KiB
9Runtime error0/128ms23216 KiB
10Runtime error0/129ms23392 KiB
11Runtime error0/129ms23876 KiB
12Runtime error0/128ms24296 KiB
13Runtime error0/228ms24420 KiB
14Runtime error0/228ms24840 KiB
15Runtime error0/229ms24920 KiB
16Runtime error0/228ms24936 KiB
17Runtime error0/228ms25184 KiB
18Runtime error0/228ms25260 KiB
19Runtime error0/228ms24956 KiB
20Runtime error0/228ms25388 KiB
21Runtime error0/229ms25888 KiB
22Runtime error0/228ms25752 KiB
23Runtime error0/229ms25588 KiB
24Runtime error0/228ms25152 KiB
25Runtime error0/228ms25704 KiB
26Runtime error0/228ms25368 KiB
27Runtime error0/229ms25416 KiB