QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#745166#9375. TouristJZYZ#WA 0ms3704kbC++14279b2024-11-14 07:52:342024-11-14 07:52:34

Judging History

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

  • [2024-11-14 07:52:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3704kb
  • [2024-11-14 07:52:34]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
int n;
signed main()
{
	int cur=1500;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		int x;
		scanf("%d",&x);
		cur+=x;
		if(cur>=4000)
		{
			cout<<i<<endl;
			return 0;
		}
	}
	cout<<-1;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5
1000 1000 1000 -5000 1000

output:

1

result:

wrong answer 1st lines differ - expected: '3', found: '1'