Created
January 2, 2015 17:25
-
-
Save omerjerk/0676b682cfb3ec6c28d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int T; | |
T = s_d(); | |
while (T--) { | |
int N; | |
N = s_d(); | |
int a[N]; | |
llu sum = 0; | |
bool flag = false; | |
for (int i = 0; i < N; ++i) { | |
a[i] = s_d(); | |
if (a[i] > 100) { | |
flag = true; | |
} | |
sum += a[i]; | |
} | |
if (sum < 100 || flag) { | |
cout<<"NO"<<endl; | |
} else if (sum >= 100 && sum < (100 + N)) { | |
cout<<"YES"<<endl; | |
} else { | |
cout<<"NO"<<endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment