Submission #1255821


Source Code Expand

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

namespace codefestival_2016_qualB_B
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int aLen = n[0];
            string a = Console.ReadLine();
            int aTuka = 0;
            int bTuka = 0;
            for(int i = 0; i < aLen; i++)
            {
                if (a[i] == 'c') { Console.WriteLine("No"); }
                else if (a[i] == 'b')
                {
                    if ((bTuka + aTuka) < n[1] + n[2] && bTuka <= n[2])
                    {
                        bTuka++;
                        Console.WriteLine("Yes");
                    }
                    else { Console.WriteLine("No"); }
                }
                else
                {
                    if (bTuka + aTuka < n[1] + n[2])
                    {
                        Console.WriteLine("Yes");aTuka++;
                    }
                    else { Console.WriteLine("No"); }
                }
            }
            Console.ReadLine();
        }
    }
}

Submission Info

Submission Time
Task B - Qualification simulator
User rayhotate
Language C# (Mono 4.6.2.0)
Score 0
Code Size 1250 Byte
Status WA
Exec Time 256 ms
Memory 15968 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 2
WA × 1
AC × 8
WA × 5
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 239 ms 11744 KB
02.txt WA 246 ms 13792 KB
03.txt AC 241 ms 11744 KB
04.txt AC 236 ms 15840 KB
05.txt AC 220 ms 15712 KB
06.txt WA 238 ms 11744 KB
07.txt AC 237 ms 15968 KB
08.txt WA 256 ms 13756 KB
09.txt AC 236 ms 13792 KB
10.txt WA 241 ms 11744 KB
s1.txt AC 22 ms 11220 KB
s2.txt WA 23 ms 13268 KB
s3.txt AC 23 ms 13268 KB