結果

問題 No.2155 みちらcolor
ユーザー 👑 kakel-sankakel-san
提出日時 2023-09-05 21:54:29
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 907 bytes
コンパイル時間 1,076 ms
コンパイル使用メモリ 69,852 KB
実行使用メモリ 25,832 KB
最終ジャッジ日時 2023-09-05 21:54:40
合計ジャッジ時間 9,368 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
21,940 KB
testcase_01 AC 60 ms
23,892 KB
testcase_02 AC 59 ms
21,784 KB
testcase_03 AC 60 ms
21,952 KB
testcase_04 AC 60 ms
23,920 KB
testcase_05 AC 59 ms
21,988 KB
testcase_06 AC 61 ms
21,740 KB
testcase_07 AC 60 ms
23,960 KB
testcase_08 AC 60 ms
21,880 KB
testcase_09 AC 60 ms
21,916 KB
testcase_10 AC 59 ms
23,792 KB
testcase_11 AC 60 ms
23,864 KB
testcase_12 AC 60 ms
21,800 KB
testcase_13 AC 60 ms
21,940 KB
testcase_14 AC 60 ms
21,884 KB
testcase_15 AC 60 ms
23,920 KB
testcase_16 AC 60 ms
21,920 KB
testcase_17 AC 59 ms
21,980 KB
testcase_18 AC 59 ms
21,796 KB
testcase_19 AC 60 ms
21,872 KB
testcase_20 AC 61 ms
22,052 KB
testcase_21 AC 61 ms
23,916 KB
testcase_22 AC 60 ms
21,856 KB
testcase_23 AC 61 ms
21,868 KB
testcase_24 AC 59 ms
21,860 KB
testcase_25 AC 59 ms
21,956 KB
testcase_26 AC 59 ms
19,836 KB
testcase_27 AC 60 ms
19,828 KB
testcase_28 AC 60 ms
21,920 KB
testcase_29 AC 61 ms
23,960 KB
testcase_30 AC 60 ms
21,964 KB
testcase_31 AC 61 ms
23,908 KB
testcase_32 AC 60 ms
21,808 KB
testcase_33 AC 60 ms
21,980 KB
testcase_34 AC 61 ms
19,756 KB
testcase_35 AC 60 ms
21,932 KB
testcase_36 AC 61 ms
25,832 KB
testcase_37 AC 60 ms
23,952 KB
testcase_38 AC 61 ms
21,864 KB
testcase_39 AC 60 ms
21,812 KB
testcase_40 AC 61 ms
24,012 KB
testcase_41 AC 61 ms
21,788 KB
testcase_42 AC 60 ms
21,928 KB
testcase_43 AC 60 ms
23,976 KB
testcase_44 AC 60 ms
23,932 KB
testcase_45 AC 60 ms
21,864 KB
testcase_46 AC 58 ms
21,908 KB
testcase_47 AC 60 ms
21,848 KB
testcase_48 AC 60 ms
21,912 KB
testcase_49 AC 59 ms
21,920 KB
testcase_50 AC 60 ms
21,804 KB
testcase_51 AC 60 ms
21,792 KB
testcase_52 AC 61 ms
21,972 KB
testcase_53 AC 59 ms
21,860 KB
testcase_54 AC 61 ms
23,860 KB
testcase_55 AC 59 ms
23,968 KB
testcase_56 AC 65 ms
23,920 KB
testcase_57 AC 60 ms
21,868 KB
testcase_58 AC 60 ms
21,912 KB
testcase_59 AC 59 ms
21,864 KB
testcase_60 AC 59 ms
21,924 KB
testcase_61 AC 59 ms
21,736 KB
testcase_62 AC 58 ms
21,792 KB
testcase_63 AC 62 ms
21,904 KB
testcase_64 AC 60 ms
21,896 KB
testcase_65 AC 59 ms
23,900 KB
testcase_66 AC 59 ms
21,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;
class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var c = NList;
        var (n, m, l) = (c[0], c[1], c[2]);
        var a = NList;
        var dp = new bool[1001];
        dp[l] = true;
        foreach (var ai in a)
        {
            var next = new bool[1001];
            for (var i = 0; i < dp.Length; ++i)
            {
                next[i] |= dp[i];
                next[(i + ai) / 2] |= dp[i];
            }
            dp = next;
        }
        WriteLine(dp[m] ? "Yes" : "No");
    }
}
0