結果
問題 |
No.1692 Expectations
|
ユーザー |
![]() |
提出日時 | 2025-04-16 14:14:38 |
言語 | C# (.NET 8.0.404) |
結果 |
WA
|
実行時間 | - |
コード長 | 902 bytes |
コンパイル時間 | 7,889 ms |
コンパイル使用メモリ | 168,752 KB |
実行使用メモリ | 208,896 KB |
最終ジャッジ日時 | 2025-04-16 14:14:49 |
合計ジャッジ時間 | 10,621 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 WA * 2 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (93 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program { static void Main() { int[] nm = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString())); int[] list = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString())); Array.Sort(list); int max = MaxNumberCount(list); int min = 0; if(max == 1) { min = 1; } else { min = 0; } Console.WriteLine(max + " " + min); } private static int MaxNumberCount(int[] list) { int max = list.Length; for(int i = 1; i < list.Length; i++) { if (list[i-1] == list[i]) { max--; } } return max; } }