77002024-01-10 13:41:45NotYouFasor (40)csharpWrong answer 10/40303ms40560 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[] h = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int nagy = h[0];
            int nagyi = 1;
            bool vege = false;
            
            for (int j = 0; j < n; j++)
            {
                for (int i = 0; i < k + 1; i++)
                {
                    if (h[i] > nagy)
                    {
                        nagyi = i + 1;
                        nagy = h[i];
                    }
                }
            }
            Console.WriteLine(nagyi);
            Console.ReadLine();
        }
    }
}
 
SubtaskSumTestVerdictTimeMemory
base10/40
1Accepted0/030ms22044 KiB
2Wrong answer0/041ms24880 KiB
3Accepted2/230ms22940 KiB
4Wrong answer0/229ms23356 KiB
5Accepted2/232ms23652 KiB
6Wrong answer0/232ms24084 KiB
7Accepted2/237ms25284 KiB
8Wrong answer0/237ms25480 KiB
9Accepted2/243ms27032 KiB
10Wrong answer0/243ms27316 KiB
11Wrong answer0/243ms27668 KiB
12Accepted2/243ms27004 KiB
13Time limit exceeded0/2263ms16460 KiB
14Runtime error0/290ms40560 KiB
15Time limit exceeded0/2277ms24452 KiB
16Time limit exceeded0/2264ms25680 KiB
17Time limit exceeded0/2273ms26456 KiB
18Time limit exceeded0/2286ms26932 KiB
19Time limit exceeded0/2303ms26820 KiB
20Time limit exceeded0/2252ms14984 KiB
21Time limit exceeded0/2286ms25224 KiB
22Time limit exceeded0/2289ms26964 KiB