QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#240944#7728. RamenkarosWA 1ms3396kbC++14271b2023-11-05 21:12:282023-11-05 21:12:29

Judging History

你现在查看的是最新测评结果

  • [2023-11-05 21:12:29]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3396kb
  • [2023-11-05 21:12:28]
  • 提交

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]