QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#236272 | #7728. Ramen | AFLeartLey0103 | WA | 1ms | 3548kb | C++14 | 300b | 2023-11-03 19:38:13 | 2023-11-03 19:38:15 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int n;
cin >> n;
int init = 0;
for(int i = 1, a; i < n; ++ i){
cin >> a;
init += a;
if(init < 0){
cout << "No\n";
return 0;
}
}
cout << "Yes\n";
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3516kb
input:
3 1 2 -5
output:
Yes
result:
ok YES
Test #2:
score: 0
Accepted
time: 0ms
memory: 3384kb
input:
5 2 -5 2 3 1
output:
No
result:
ok NO
Test #3:
score: 0
Accepted
time: 0ms
memory: 3428kb
input:
5 3 -2 1 -1 -1
output:
Yes
result:
ok YES
Test #4:
score: 0
Accepted
time: 0ms
memory: 3332kb
input:
5 -1 100 100 100 100
output:
No
result:
ok NO
Test #5:
score: -100
Wrong Answer
time: 1ms
memory: 3548kb
input:
5 3 -3 2 5 1
output:
Yes
result:
wrong answer expected NO, found YES [1st token]