76952024-01-10 13:35:30NotYouFasor (40)csharpWrong answer 6/40301ms40280 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 = 0;
            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
base6/40
1Accepted0/032ms22044 KiB
2Wrong answer0/043ms24896 KiB
3Accepted2/230ms22912 KiB
4Wrong answer0/229ms23232 KiB
5Wrong answer0/230ms23448 KiB
6Wrong answer0/230ms23684 KiB
7Accepted2/235ms24548 KiB
8Wrong answer0/237ms25192 KiB
9Wrong answer0/243ms26436 KiB
10Wrong answer0/245ms27288 KiB
11Wrong answer0/243ms27300 KiB
12Accepted2/243ms27012 KiB
13Time limit exceeded0/2301ms16168 KiB
14Runtime error0/289ms40280 KiB
15Time limit exceeded0/2266ms24172 KiB
16Time limit exceeded0/2277ms25740 KiB
17Time limit exceeded0/2266ms27092 KiB
18Time limit exceeded0/2270ms26848 KiB
19Time limit exceeded0/2241ms26596 KiB
20Time limit exceeded0/2252ms14900 KiB
21Time limit exceeded0/2277ms25360 KiB
22Time limit exceeded0/2257ms26676 KiB