結果
| 問題 |
No.2155 みちらcolor
|
| コンテスト | |
| ユーザー |
Rute
|
| 提出日時 | 2022-12-11 02:51:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 124 ms / 2,000 ms |
| コード長 | 422 bytes |
| コンパイル時間 | 130 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-10-15 02:31:10 |
| 合計ジャッジ時間 | 7,390 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 64 |
ソースコード
N, M, L = map(int,input().split())
A = [0] + list(map(int,input().split()))
#dp[i][j] = i番目の色までで色jを作ることが出来るか
dp = [[0 for x in range(1010)] for y in range(110)]
dp[0][L] = 1
for x in range(1, N + 1):
for y in range(1010):
dp[x][y] = max(dp[x][y], dp[x-1][y])
if dp[x-1][y] == 1:
C = (y + A[x]) // 2
dp[x][C] = 1
if dp[N][M] == 1:
print("Yes")
else:
print("No")
Rute