标签:com http class blog style div img code java javascript log
#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 = 0 ; i < n ; ++ i) cin >> a[i]; sort(a.begin(),a.end()); int sum = accumulate(a.begin(),a.end()-1,0); if(sum > s) cout<<"NO"<<endl; else cout<<"YES"<<endl; return 0; }
Codeforces Round #243 (Div. 2) A. Sereja and Mugs,布布扣,bubuko.com
Codeforces Round #243 (Div. 2) A. Sereja and Mugs
标签:com http class blog style div img code java javascript log
原文地址:http://www.cnblogs.com/xiongqiangcs/p/3698107.html