結果

問題 No.2153 何コーダーが何人?
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2023-03-08 19:16:13
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 1,249 bytes
コンパイル時間 6,591 ms
コンパイル使用メモリ 156,432 KB
実行使用メモリ 175,636 KB
最終ジャッジ日時 2023-10-18 06:01:56
合計ジャッジ時間 8,661 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
31,312 KB
testcase_01 AC 59 ms
31,436 KB
testcase_02 AC 60 ms
31,564 KB
testcase_03 AC 59 ms
31,676 KB
testcase_04 AC 59 ms
31,652 KB
testcase_05 AC 59 ms
31,612 KB
testcase_06 AC 59 ms
31,724 KB
testcase_07 AC 60 ms
31,660 KB
testcase_08 AC 60 ms
31,572 KB
testcase_09 AC 61 ms
31,676 KB
testcase_10 AC 59 ms
31,596 KB
testcase_11 AC 59 ms
31,804 KB
testcase_12 AC 59 ms
31,556 KB
testcase_13 AC 58 ms
31,628 KB
testcase_14 AC 59 ms
31,596 KB
testcase_15 AC 59 ms
31,564 KB
testcase_16 AC 60 ms
31,780 KB
testcase_17 AC 60 ms
31,724 KB
testcase_18 AC 60 ms
31,708 KB
testcase_19 AC 59 ms
31,316 KB
testcase_20 AC 58 ms
175,636 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (99 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

class Scanner
{
    string[] s;
    int i;
    char[] cs = new char[] { ' ' };
    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string Next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return Next();
        i = 0;
        return s[i++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }
}

class Program
{

    static void Main(string[] args)
    {
        // Comment

        var scanner = new Scanner();
        int N = scanner.NextInt();

        var dic = new Dictionary<string, int>();

        for (int i=0 ; i < N ; i++){
            string s = scanner.Next();
            int c = scanner.NextInt();
            dic[s] = c;
        }

        
        int[] lis = new int[8];
        foreach (var col in dic.Values){
            lis[col]++;
        }

        for (int i=0 ; i < 8 ; i++){
            Console.WriteLine(lis[i]);
        }

    }
}
0