結果

問題 No.1380 Borderline
ユーザー bluemeganebluemegane
提出日時 2021-04-17 07:39:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 593 bytes
コンパイル時間 826 ms
コンパイル使用メモリ 65,964 KB
実行使用メモリ 23,620 KB
最終ジャッジ日時 2023-09-16 13:16:10
合計ジャッジ時間 5,414 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
21,580 KB
testcase_01 AC 59 ms
23,456 KB
testcase_02 AC 58 ms
23,456 KB
testcase_03 AC 60 ms
21,604 KB
testcase_04 AC 59 ms
21,468 KB
testcase_05 AC 59 ms
21,596 KB
testcase_06 AC 59 ms
23,388 KB
testcase_07 AC 58 ms
19,604 KB
testcase_08 AC 58 ms
21,408 KB
testcase_09 AC 58 ms
21,416 KB
testcase_10 AC 58 ms
23,516 KB
testcase_11 AC 59 ms
23,504 KB
testcase_12 AC 59 ms
21,496 KB
testcase_13 AC 59 ms
19,436 KB
testcase_14 AC 67 ms
21,648 KB
testcase_15 AC 67 ms
21,736 KB
testcase_16 AC 66 ms
23,488 KB
testcase_17 AC 67 ms
23,464 KB
testcase_18 AC 66 ms
19,468 KB
testcase_19 AC 67 ms
21,624 KB
testcase_20 AC 67 ms
21,680 KB
testcase_21 AC 67 ms
23,568 KB
testcase_22 AC 67 ms
21,508 KB
testcase_23 AC 67 ms
23,596 KB
testcase_24 AC 67 ms
21,684 KB
testcase_25 AC 68 ms
21,640 KB
testcase_26 AC 66 ms
23,620 KB
testcase_27 AC 66 ms
23,484 KB
testcase_28 AC 67 ms
21,680 KB
testcase_29 AC 65 ms
21,580 KB
testcase_30 AC 66 ms
23,488 KB
testcase_31 AC 66 ms
19,636 KB
testcase_32 AC 66 ms
21,552 KB
testcase_33 AC 66 ms
19,492 KB
testcase_34 AC 66 ms
21,640 KB
testcase_35 AC 65 ms
21,400 KB
testcase_36 AC 68 ms
21,468 KB
testcase_37 AC 69 ms
21,640 KB
testcase_38 AC 67 ms
21,520 KB
testcase_39 AC 67 ms
21,520 KB
testcase_40 AC 65 ms
23,496 KB
testcase_41 AC 67 ms
23,552 KB
testcase_42 AC 66 ms
21,480 KB
testcase_43 AC 67 ms
23,564 KB
testcase_44 AC 59 ms
23,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using static System.Math;
using System.Linq;
using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var k = int.Parse(line[1]);
        line = Console.ReadLine().Trim().Split(' ');
        var p = Array.ConvertAll(line, int.Parse);
        getAns(k, p);
    }
    static void getAns(int k, int[] p)
    {
        var ans = 0;
        for (int i = 0; i <= 400; i++)
        {
            var ok = p.Count(x => x >= i);
            if (ok <= k) ans = Max(ans, ok);
        }
        Console.WriteLine(ans);
    }
}
0