Submission #67295536
Source Code Expand
#pragma GCC optimize("Ofast", "unroll-loops")
//#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
//#pragma comment(linker, "/STACK:268435456")
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <cstring>
//#include <sstream>
//#include <fstream>
#include <bitset>
#include <string>
#include <iomanip>
#include <chrono>
#include <random>
#define debug(x) cout << #x << "=" << x << "(DEBUG)\n"
#define rep(I, a, b) for(int I = a;I < b;I++)
#define repe(I, a, b) for(int I = a;I <= b;I++)
#define rrep(I, a, b) for(int I = a;I >= b;I--)
#define trav(I, ob) for(auto& I : ob)
#define YES cout << "Yes\n"
#define NO cout << "No\n"
typedef long long ll;
//#define int ll
const int maxn = 1e6 + 10;
const int maxn2 = 2e3 + 10;
//const int base = 2e5 + 5;
const int mod = 998244353;
using namespace std;
using pii = pair<int, int>;
using piii = pair<int, pii>;
using pdi = pair<double, int>;
using pdii = pair<double, pii>;
using pll = pair<ll, ll>;
using plll = pair<ll, pll>;
using pcc = pair<char, char>;
using pss = pair<string, string>;
const int mxx1 = 1e9 + 5;
const ll mxx2 = 1e17;
inline int solve() {
int N, M;
cin>>N>>M;
int s = 0;
int x;
rep(i,0,N){
cin>>x;
s+=x;
}
cout << (s > M ? "No\n" : "Yes\n");
return 0;
}
// #define CF
//#define SUBMIT
signed main() {
#ifdef SUBMIT
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#else
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
int T = 1;
#ifdef CF
cin >> T;
#endif // CF
repe(i, 1, T) {
//cout << "Testcase #" << i << '\n';
solve();
}
return 0;
}
Submission Info
| Submission Time |
|
| Task |
A - Content Too Large |
| User |
ht177970 |
| Language |
C++ 20 (gcc 12.2) |
| Score |
100 |
| Code Size |
1818 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3524 KiB |
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt |
| Case Name |
Status |
Exec Time |
Memory |
| 00_sample_00.txt |
AC |
1 ms |
3400 KiB |
| 00_sample_01.txt |
AC |
1 ms |
3524 KiB |
| 00_sample_02.txt |
AC |
1 ms |
3464 KiB |
| 01_random_03.txt |
AC |
1 ms |
3464 KiB |
| 01_random_04.txt |
AC |
1 ms |
3324 KiB |
| 01_random_05.txt |
AC |
1 ms |
3396 KiB |
| 01_random_06.txt |
AC |
1 ms |
3472 KiB |
| 01_random_07.txt |
AC |
1 ms |
3464 KiB |
| 01_random_08.txt |
AC |
1 ms |
3472 KiB |
| 01_random_09.txt |
AC |
1 ms |
3308 KiB |
| 01_random_10.txt |
AC |
1 ms |
3392 KiB |
| 01_random_11.txt |
AC |
1 ms |
3428 KiB |
| 01_random_12.txt |
AC |
1 ms |
3476 KiB |