結果
問題 |
No.2155 みちらcolor
|
ユーザー |
|
提出日時 | 2023-03-16 23:34:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 615 bytes |
コンパイル時間 | 1,901 ms |
コンパイル使用メモリ | 191,976 KB |
最終ジャッジ日時 | 2025-02-11 12:07:16 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 63 WA * 1 |
ソースコード
#include<bits/stdc++.h> using namespace std; const int N=1100; int n,m,l; int f[N]; int main(){ //freopen("out.txt","w",stdout); cin>>n>>m>>l; assert(n>=1&&n<=100); assert(m>=1&&m<=1000); assert(l>=1&&l<=1000); f[l]=1; for(int i=0;i<n;i++){ int x; cin>>x; assert(x>=1&&x<=1000); for(int j=0;j<=1000;j++){ //只能使用一次 if(f[j]==1) f[(j+x)/2]=2; } for(int j=0;j<=1000;j++){ //只能使用一次 if(f[j]==2) f[j]=1; } } if(f[m]) cout<<"Yes"; else cout<<"No"; return 0; }