結果
| 問題 |
No.2155 みちらcolor
|
| コンテスト | |
| ユーザー |
_yurimoir
|
| 提出日時 | 2022-12-09 21:49:52 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 530 bytes |
| コンパイル時間 | 3,124 ms |
| コンパイル使用メモリ | 248,944 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-14 21:33:18 |
| 合計ジャッジ時間 | 5,353 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 60 WA * 3 RE * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,l;
cin>>n>>m>>l;
vector<int> a(n);
for(auto& x:a)cin>>x;
vector<vector<int>> dp(n+1,vector<int>(1005,0));
dp[0][l]=1;
for(int i=1;i<=n;i++){
for(int j=1;j<1005;j++){
dp[i][j]=max(dp[i][j],dp[i-1][j]);
if(dp[i-1][j]>0){
int nx=(a[i]+j)/2;
dp[i][nx]=1;
}
}
}
if(dp[n][m]>0){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
_yurimoir