#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std; int main(){
int n,s;
cin >> n >> s;
vector<int> a(n);
for(int i = ; i < n ; ++ i) cin >> a[i];
sort(a.begin(),a.end());
int sum = accumulate(a.begin(),a.end()-,);
if(sum > s) cout<<"NO"<<endl;
else cout<<"YES"<<endl;
return ;
}
相关文章
- Educational Codeforces Round 78 (Rated for Div. 2) A. Shuffle Hashing
- Codeforces Round #248 (Div. 2) A. Kitahara Haruki's Gift
- Codeforces Round #497 (Div. 2) A. Romaji
- Codeforces Round #325 (Div. 2) A. Alena's Schedule 水题
- Codeforces Round #192 (Div. 2) (330A) A. Cakeminator
- Codeforces Round #328 (Div. 2)_A. PawnChess
- Codeforces Round #235 (Div. 2) A. Vanya and Cards
- Codeforces Round #525 (Div. 2)A. Ehab and another construction problem
- Codeforces Round #272 (Div. 2) A. Dreamoon and Stairs 水题
- Codeforces Round #272 (Div. 2)-A. Dreamoon and Stairs