Submission #1247899


Source Code Expand

using System;
using System.Linq;

namespace codefestival_2016_qualB_b
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
            string s = Console.ReadLine();
            int a = x[1] + x[2];
            for (int i = 0; i < x[0]; i++)
            {
                if (a > 0)
                {
                    switch (s[i])
                    {
                        case ('a'):
                            {
                                Console.WriteLine("Yes");
                                a--;
                                break;
                            }
                        case ('b'):
                            {
                                if (x[2] > 0)
                                {
                                    Console.WriteLine("Yes");
                                    a--;
                                    x[2]--;
                                }
                                else
                                {
                                    Console.WriteLine("No");
                                }
                                break;
                            }
                        default:
                            {
                                Console.WriteLine("No");
                                break;
                            }
                    }
                }
                else
                {
                    Console.WriteLine("No");
                }
            }
            //Console.ReadLine();
        }
    }
}

Submission Info

Submission Time
Task B - Qualification simulator
User mencotton
Language C# (Mono 4.6.2.0)
Score 200
Code Size 1699 Byte
Status AC
Exec Time 244 ms
Memory 15840 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 13
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt AC 236 ms 15840 KB
02.txt AC 239 ms 15840 KB
03.txt AC 238 ms 13792 KB
04.txt AC 237 ms 13792 KB
05.txt AC 213 ms 13664 KB
06.txt AC 240 ms 13628 KB
07.txt AC 244 ms 13920 KB
08.txt AC 244 ms 13792 KB
09.txt AC 237 ms 11744 KB
10.txt AC 241 ms 15840 KB
s1.txt AC 22 ms 9172 KB
s2.txt AC 22 ms 11220 KB
s3.txt AC 22 ms 13396 KB