77042024-01-10 13:59:23TortelliniJrFasor (40)csharpWrong answer 2/40174ms75192 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace racshalo
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] inp = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int fsz = inp[0];
            int max = inp[1];
            int[] fakbeta = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int[] fak = new int[fsz + 2 * max];
            fakbeta.CopyTo(fak, max);
            int u = -1;
            for (int i = max; i < fsz + max; i++)
            {
                if (fak.ToList().GetRange(i - max, 2 * max + 1).Max() <= fak[i])
                {
                    u = i - 2;
                    break;
                }
            }
            Console.WriteLine(u);
            Console.ReadLine();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base2/40
1Accepted0/034ms21960 KiB
2Wrong answer0/050ms36792 KiB
3Accepted2/232ms23060 KiB
4Wrong answer0/232ms23468 KiB
5Wrong answer0/232ms23852 KiB
6Wrong answer0/232ms23700 KiB
7Wrong answer0/237ms24500 KiB
8Wrong answer0/243ms31684 KiB
9Wrong answer0/243ms26692 KiB
10Wrong answer0/250ms38880 KiB
11Wrong answer0/264ms60280 KiB
12Wrong answer0/243ms28552 KiB
13Runtime error0/2128ms75052 KiB
14Runtime error0/2155ms75192 KiB
15Runtime error0/2171ms75052 KiB
16Runtime error0/2166ms75048 KiB
17Runtime error0/2174ms74896 KiB
18Runtime error0/2171ms75024 KiB
19Runtime error0/2160ms74956 KiB
20Runtime error0/2148ms74600 KiB
21Runtime error0/2171ms74676 KiB
22Runtime error0/2165ms74628 KiB