QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#72808#4837. Ramenckiseki#WA 0ms3388kbC++20335b2023-01-19 14:48:592023-01-19 14:49:02

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-19 14:49:02]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3388kb
  • [2023-01-19 14:48:59]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    int n; cin >> n;
    vector<int> a(n);
    int64_t sum = 0;
    for (int &ai : a) {
        cin >> ai;
        sum += ai;
        if (sum <= 0)
            return cout << "NO\n", 0;
    }
    cout << "YES\n";
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3388kb

input:

3
1 2 -5

output:

NO

result:

wrong answer expected YES, found NO