結果

問題 No.2155 みちらcolor
ユーザー viral8viral8
提出日時 2022-12-09 21:57:41
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 1,919 ms
コンパイル使用メモリ 74,356 KB
実行使用メモリ 56,456 KB
最終ジャッジ日時 2024-04-22 22:03:53
合計ジャッジ時間 11,474 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
54,264 KB
testcase_01 AC 134 ms
53,864 KB
testcase_02 AC 125 ms
53,812 KB
testcase_03 AC 134 ms
54,120 KB
testcase_04 AC 118 ms
53,072 KB
testcase_05 AC 134 ms
54,160 KB
testcase_06 AC 127 ms
53,876 KB
testcase_07 AC 117 ms
54,020 KB
testcase_08 AC 136 ms
53,952 KB
testcase_09 AC 128 ms
54,120 KB
testcase_10 AC 109 ms
53,104 KB
testcase_11 AC 119 ms
54,092 KB
testcase_12 AC 126 ms
53,896 KB
testcase_13 AC 116 ms
54,000 KB
testcase_14 AC 124 ms
53,856 KB
testcase_15 AC 117 ms
53,972 KB
testcase_16 AC 109 ms
53,084 KB
testcase_17 AC 104 ms
53,032 KB
testcase_18 AC 122 ms
54,124 KB
testcase_19 AC 124 ms
54,236 KB
testcase_20 AC 129 ms
54,316 KB
testcase_21 AC 129 ms
54,464 KB
testcase_22 AC 124 ms
54,176 KB
testcase_23 AC 137 ms
54,460 KB
testcase_24 AC 128 ms
54,564 KB
testcase_25 AC 120 ms
53,236 KB
testcase_26 AC 126 ms
54,120 KB
testcase_27 AC 128 ms
54,480 KB
testcase_28 AC 129 ms
54,044 KB
testcase_29 AC 122 ms
53,984 KB
testcase_30 AC 128 ms
54,168 KB
testcase_31 AC 130 ms
54,000 KB
testcase_32 AC 136 ms
54,204 KB
testcase_33 AC 119 ms
53,528 KB
testcase_34 AC 126 ms
54,224 KB
testcase_35 AC 125 ms
54,064 KB
testcase_36 AC 122 ms
53,860 KB
testcase_37 AC 129 ms
56,456 KB
testcase_38 AC 124 ms
53,820 KB
testcase_39 AC 126 ms
54,136 KB
testcase_40 WA -
testcase_41 AC 123 ms
54,036 KB
testcase_42 AC 119 ms
54,100 KB
testcase_43 WA -
testcase_44 AC 111 ms
53,444 KB
testcase_45 AC 105 ms
53,024 KB
testcase_46 WA -
testcase_47 AC 113 ms
54,096 KB
testcase_48 AC 112 ms
53,940 KB
testcase_49 WA -
testcase_50 AC 116 ms
54,084 KB
testcase_51 WA -
testcase_52 AC 118 ms
54,152 KB
testcase_53 AC 117 ms
54,180 KB
testcase_54 AC 107 ms
52,996 KB
testcase_55 AC 103 ms
52,820 KB
testcase_56 AC 113 ms
54,136 KB
testcase_57 AC 117 ms
53,904 KB
testcase_58 AC 104 ms
53,112 KB
testcase_59 AC 102 ms
52,544 KB
testcase_60 AC 116 ms
54,124 KB
testcase_61 AC 118 ms
53,860 KB
testcase_62 WA -
testcase_63 AC 114 ms
54,228 KB
testcase_64 AC 113 ms
53,972 KB
testcase_65 AC 113 ms
53,940 KB
testcase_66 AC 105 ms
52,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int L = sc.nextInt();
		boolean[] dp = new boolean[1001];
		dp[0] = true;
		while(N-->0){
			boolean[] next = new boolean[1001];
			int A = sc.nextInt();
			for(int i=0;i<=1000;i++){
				next[i] |= dp[i];
				next[(i+A)/2] |= dp[i];
			}
			dp = next;
		}
		System.out.println(dp[M]?"Yes":"No");
	}
}
0