QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#586665#9375. TouristYuLan#WA 0ms3700kbC++14377b2024-09-24 14:54:502024-09-24 14:54:51

Judging History

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

  • [2024-09-24 14:54:51]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3700kb
  • [2024-09-24 14:54:50]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+10;
int a[N];
int main()
{
	cin.tie(0);
	cout.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin>>n;
	int now = 1500,x;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	a[0] = 0;
	for(int i=0;i<=n;i++)
	{
		now = now + a[i];
		if(now>=4000)
		{
			cout<<i<<endl;
			break;
		}
	}
	return 0;
} 

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3700kb

input:

5
1000 1000 1000 -5000 1000

output:

3

result:

ok single line: '3'

Test #2:

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

input:

5
20 -100 10 -150 5

output:


result:

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