Submission #19558159


Source Code Expand

Copy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication17
{
	class Program
	{
		static void Main(string[] args)
		{
			var w = Console.ReadLine().Split(' ');
			
			int n = int.Parse(w[0]);
			
			int x = int.Parse(w[1]);
			
			string s = Console.ReadLine();
			
			for (int i=0; i<n; i++)
			{
				if (s[i] == 'o')
					x++;
				else if (x>0)
					x--;
			}
			Console.WriteLine(x);



		}
	}
}

Submission Info

Submission Time
Task B - Quizzes
User wads
Language C# (.NET Core 3.1.201)
Score 200
Code Size 521 Byte
Status AC
Exec Time 103 ms
Memory 28124 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 84 ms 27316 KB
random_02.txt AC 103 ms 27980 KB
random_03.txt AC 82 ms 27240 KB
random_04.txt AC 91 ms 27928 KB
random_05.txt AC 92 ms 28012 KB
random_06.txt AC 83 ms 28124 KB
random_07.txt AC 87 ms 27856 KB
sample_01.txt AC 80 ms 27100 KB
sample_02.txt AC 82 ms 26964 KB
sample_03.txt AC 96 ms 27168 KB