QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#240944 | #7728. Ramen | karos | WA | 1ms | 3396kb | C++14 | 271b | 2023-11-05 21:12:28 | 2023-11-05 21:12:29 |
Judging History
answer
#include <iostream>
using namespace std;
int main(){
int n,sum=0;
cin>>n;
int arr[n];
for(int i=0;i<n;i++) cin>>arr[i];
for (int i = 0; i < n; ++i) {
if (sum+arr[i]<=0){
puts("NO");
}
}
puts("YES");
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3396kb
input:
3 1 2 -5
output:
NO YES
result:
wrong answer expected YES, found NO [1st token]