#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 ;
}
相关文章
- codeforces水题100道 第十二题 Codeforces Beta Round #91 (Div. 2 Only) A. Lucky Division (brute force)
- Codeforces Round #604 (Div. 2) A. Beautiful String
- Codeforces Round #604 (Div. 2) A. Beautiful String(贪心)
- Codeforces Round #223 (Div. 2) E. Sereja and Brackets 线段树区间合并
- Codeforces Round #603 (Div. 2) A. Sweet Problem(水.......没做出来)+C题
- Codeforces Round #185 (Div. 2) A. Whose sentence is it? 水题
- Codeforces Round #373 (Div. 2) A. Vitya in the Countryside 水题
- Codeforces Round #368 (Div. 2) A. Brain's Photos (水题)
- Codeforces Round #355 (Div. 2) A. Vanya and Fence 水题
- Codeforces Round #297 (Div. 2)A. Vitaliy and Pie 水题