QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#407341 | #7728. Ramen | sdutcm_zcy | WA | 1ms | 3644kb | C++11 | 266b | 2024-05-08 16:09:20 | 2024-05-08 16:09:21 |
Judging History
answer
#include<iostream>
using namespace std;
int main()
{
int n;
cin >>n;
int sum = 0;
int arr[100];
for(int i =0;i<n;i++)
{
cin>>arr[i];
sum+=arr[i];
if(sum<=0)
{
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3644kb
input:
3 1 2 -5
output:
No
result:
wrong answer expected YES, found NO [1st token]