結果
| 問題 |
No.2155 みちらcolor
|
| コンテスト | |
| ユーザー |
_yurimoir
|
| 提出日時 | 2022-12-09 21:48:31 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 555 bytes |
| コンパイル時間 | 3,453 ms |
| コンパイル使用メモリ | 249,212 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-14 21:30:44 |
| 合計ジャッジ時間 | 5,404 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 59 WA * 4 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++){
dp[i][a[i-1]]=1;
for(int j=0;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