結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-04-14 16:46:10 |
| 言語 | C# (.NET 10.0.201) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 590 bytes |
| 記録 | |
| コンパイル時間 | 4,804 ms |
| コンパイル使用メモリ | 171,240 KB |
| 実行使用メモリ | 193,212 KB |
| 最終ジャッジ日時 | 2026-07-08 20:47:30 |
| 合計ジャッジ時間 | 8,028 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 WA * 14 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (89 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
int[] n = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString()));
int[] cardList = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString()));
Array.Sort(cardList);
int count = 1;
for(int i = 1; i < n[1]; i++)
{
if (cardList[i-1] != cardList[i])
{
count++;
}
}
Console.WriteLine(count);
}
}
Maeda