MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / main

Function main

CodeChef_problems/WATMELON/solution.cpp:13–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11using namespace std;
12
13int main() {
14 ios_base::sync_with_stdio(false); // Speeds up the execution time
15 cin.tie(NULL);
16
17 lli t; // number of test cases
18 cin >> t;
19
20 while(t--) {
21 lli n;
22 cin >> n;
23
24 lli sum = 0;
25 lli num;
26
27 for(int i = 0; i < n; i++) {
28 cin >> num;
29 sum += num;
30 }
31
32 if(sum >= 0)
33 cout << "YES" << endl;
34 else
35 cout << "NO" << endl;
36 }
37
38 return 0;
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected