77622024-01-11 08:50:10BotiKártyajátékcsharpRuntime error 7/30488ms60596 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Kartyajatek
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			string input2 = Console.ReadLine();
			string[] input3 = input1.Split(' ');
			int k = int.Parse(input3[1]);
			string[] input4 = input2.Split(' ');
			int pont = 0;
			bool pont1 = true;
			List<int> a = new List<int>();
			for (int i = 0; i < k; i++)
			{
				a.Add(int.Parse(input4[i]));
			}
			int b = 0;
			while (a.Count > b)
			{
				for (int i = b; i < a.Count; i++)
				{
					if(a[i]<a[b])
					{
						a.RemoveAt(i);
						if (pont1)
						{
							pont1 = false;
							pont++;
						}
					}
				}
				pont1 = true;
				b++;
			}
			Console.WriteLine(pont);
		}
	}
}
SubtaskSumTestVerdictTimeMemory
base7/30
1Accepted0/028ms20748 KiB
2Runtime error0/085ms57140 KiB
3Accepted1/128ms21496 KiB
4Accepted1/128ms21804 KiB
5Accepted1/128ms21900 KiB
6Wrong answer0/234ms22468 KiB
7Accepted2/237ms23296 KiB
8Accepted2/235ms23272 KiB
9Time limit exceeded0/1446ms12880 KiB
10Time limit exceeded0/2472ms15428 KiB
11Time limit exceeded0/3469ms15572 KiB
12Time limit exceeded0/3488ms15784 KiB
13Runtime error0/186ms59124 KiB
14Runtime error0/290ms59688 KiB
15Runtime error0/386ms60196 KiB
16Runtime error0/390ms60596 KiB
17Runtime error0/393ms60464 KiB