QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#407320#7728. RamenduoxingyunWA 1ms3596kbC++17266b2024-05-08 15:31:302024-05-08 15:31:31

Judging History

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

  • [2024-05-08 15:31:31]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3596kb
  • [2024-05-08 15:31:30]
  • 提交

answer

#include<iostream>

using namespace std;

int main(){
	
	int n;
	cin >> n;
	bool flag = 0;
	
	for(int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		if(i < n - 1 && x < 0) flag = 1;
	}
	
	if(flag == 0) puts("Yes");
	else puts("No");
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3596kb

input:

3
1 2 -5

output:

Yes

result:

ok YES

Test #2:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

5
2 -5 2 3 1

output:

No

result:

ok NO

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3484kb

input:

5
3 -2 1 -1 -1

output:

No

result:

wrong answer expected YES, found NO [1st token]