QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#407314 | #7728. Ramen | duoxingyun | WA | 1ms | 3648kb | C++14 | 251b | 2024-05-08 15:19:25 | 2024-05-08 15:19:25 |
Judging History
answer
#include<iostream>
using namespace std;
int main(){
int n;
cin >> n;
int sum = 0;
for(int i = 0; i < n; i++)
{
int x;
cin >> x;
sum += x;
}
if(sum <= 0) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3648kb
input:
3 1 2 -5
output:
Yes
result:
ok YES
Test #2:
score: 0
Accepted
time: 1ms
memory: 3500kb
input:
5 2 -5 2 3 1
output:
No
result:
ok NO
Test #3:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
5 3 -2 1 -1 -1
output:
Yes
result:
ok YES
Test #4:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
5 -1 100 100 100 100
output:
No
result:
ok NO
Test #5:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
5 3 -3 2 5 1
output:
No
result:
ok NO
Test #6:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
10 1 2 3 4 5 -15 100 200 300 100
output:
No
result:
ok NO
Test #7:
score: -100
Wrong Answer
time: 0ms
memory: 3636kb
input:
10 1 2 3 4 5 -14 100 200 300 100
output:
No
result:
wrong answer expected YES, found NO [1st token]