結果

問題 No.1692 Expectations
ユーザー bluemeganebluemegane
提出日時 2021-10-02 07:06:47
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 678 bytes
コンパイル時間 1,175 ms
コンパイル使用メモリ 67,868 KB
実行使用メモリ 48,204 KB
最終ジャッジ日時 2023-09-27 07:32:31
合計ジャッジ時間 3,973 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
24,700 KB
testcase_01 WA -
testcase_02 AC 66 ms
22,848 KB
testcase_03 AC 64 ms
22,764 KB
testcase_04 AC 64 ms
22,692 KB
testcase_05 AC 66 ms
22,840 KB
testcase_06 AC 67 ms
24,752 KB
testcase_07 AC 59 ms
24,588 KB
testcase_08 AC 68 ms
24,788 KB
testcase_09 WA -
testcase_10 AC 122 ms
41,492 KB
testcase_11 WA -
testcase_12 AC 56 ms
22,548 KB
testcase_13 AC 58 ms
24,660 KB
testcase_14 AC 71 ms
23,912 KB
testcase_15 AC 144 ms
44,664 KB
testcase_16 AC 72 ms
24,004 KB
testcase_17 AC 99 ms
31,008 KB
testcase_18 AC 78 ms
27,308 KB
testcase_19 WA -
testcase_20 AC 133 ms
44,900 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        getAns(n, m, a);
    }
    static void getAns(int n, int m, int[] a)
    {
        int ansmax, ansmin;
        var hs = new HashSet<int>();
        for (int i = 0; i < n; i++) hs.Add(a[i]);
        ansmax = hs.Count();
        ansmin = n == m ? 1 : 0;
        Console.WriteLine("{0} {1}", ansmax, ansmin);
    }
}
0