77842024-01-11 10:00:49NotYouFasor (40)csharpWrong answer 18/40153ms61156 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace fasor1
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] s = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int n = s[0]; 
            int k = s[1]; 
            int[] magas = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int jf = magas[0];
            int ind = 1; 
            for (int i = 0; i < n-k; i++)
            {
                if (jf<magas[i])
                {
                    jf = magas[i];
                    ind = i+1;
                }
            }
            Console.WriteLine(ind);
            Console.ReadLine();
        }
    }
}
 
SubtaskSumTestVerdictTimeMemory
base18/40
1Accepted0/032ms21484 KiB
2Wrong answer0/041ms24444 KiB
3Accepted2/230ms22640 KiB
4Wrong answer0/230ms22916 KiB
5Accepted2/230ms23596 KiB
6Wrong answer0/229ms23548 KiB
7Accepted2/237ms24680 KiB
8Wrong answer0/237ms25548 KiB
9Accepted2/241ms27084 KiB
10Wrong answer0/241ms27344 KiB
11Wrong answer0/243ms27320 KiB
12Accepted2/241ms26936 KiB
13Accepted2/293ms42732 KiB
14Wrong answer0/290ms40436 KiB
15Accepted2/2142ms57348 KiB
16Wrong answer0/2149ms59144 KiB
17Accepted2/2152ms60780 KiB
18Wrong answer0/2153ms60864 KiB
19Wrong answer0/2153ms60912 KiB
20Wrong answer0/281ms38120 KiB
21Accepted2/2143ms57868 KiB
22Wrong answer0/2153ms61156 KiB