QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#407341#7728. Ramensdutcm_zcyWA 1ms3644kbC++11266b2024-05-08 16:09:202024-05-08 16:09:21

Judging History

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

  • [2024-05-08 16:09:21]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3644kb
  • [2024-05-08 16:09:20]
  • 提交

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;
}

詳細信息

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]