QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#745166 | #9375. Tourist | JZYZ# | WA | 0ms | 3704kb | C++14 | 279b | 2024-11-14 07:52:34 | 2024-11-14 07:52:34 |
Judging History
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'