結果
| 問題 |
No.2153 何コーダーが何人?
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2023-03-08 19:16:13 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 2,000 ms |
| コード長 | 1,249 bytes |
| コンパイル時間 | 6,555 ms |
| コンパイル使用メモリ | 168,832 KB |
| 実行使用メモリ | 183,296 KB |
| 最終ジャッジ日時 | 2024-09-18 02:38:41 |
| 合計ジャッジ時間 | 8,634 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (81 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
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]);
}
}
}
SPD_9X2