Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- ios_base::sync_with_stdio(0);
- //freopen("input.txt","r",stdin);
- //freopen("output.txt","w",stdout);
- int t;
- cin >> t;
- for(int kk = 1; kk <= t; kk++)
- {
- int n;
- cin >> n;
- int sum = 0;
- for(int i = 1; i <= n; i++)
- {
- int x;
- cin >> x;
- if(x <= 2048)
- sum += x;
- }
- if(sum >= 2048) cout << "YES" << endl;
- else cout << "NO" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement