Submission #532996


Source Code Expand

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

class Program
{
    static string InputPattern = "InputX";

    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();

        if (InputPattern == "Input1") {
            WillReturn.Add("3");
            WillReturn.Add("higashikyoto");
            WillReturn.Add("kupconsitetokyotokyoto");
            WillReturn.Add("goodluckandhavefun");
            //1
            //2
            //0
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }

    static void Main()
    {
        List<string> InputList = GetInputList();
        string[] SArr = InputList.Skip(1).ToArray();

        foreach (string EachStr in SArr) {
            Console.WriteLine(Regex.Matches(EachStr, "tokyo|kyoto").Count);
        }
    }
}

Submission Info

Submission Time
Task A - 東京都
User aketijyuuzou
Language C# (Mono 3.2.1.0)
Score 100
Code Size 1009 Byte
Status AC
Exec Time 169 ms
Memory 11936 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 3
Set Name Test Cases
All 10_random_to_kyo.txt, 20_noised_tokyoto.txt, 99_teuchi.txt
Case Name Status Exec Time Memory
10_random_to_kyo.txt AC 169 ms 11896 KB
20_noised_tokyoto.txt AC 167 ms 11936 KB
99_teuchi.txt AC 166 ms 11792 KB