QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#582853 | #9375. Tourist | lei | WA | 0ms | 3584kb | C++14 | 649b | 2024-09-22 17:38:11 | 2024-09-22 17:38:15 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define double long double
#define PII pair<int,int>
#define TIII tuple<int,int,int>
const int N = 2e6 + 10;
int dx[]={1,-1,0,0};
int dy[]={0,0,-1,1};
int n,m,a[N];
void solve()
{
cin>>n;
int sum=1500;
for(int i=1;i<=n;i++)
{
int x;
cin>>x;
sum+=x;
if(sum>=4000)
{
cout<<i<<endl;
return ;
}
}
}
signed main()
{
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int t=1;
cin>>t;
while(t--) solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3584kb
input:
5 1000 1000 1000 -5000 1000
output:
9 3 3 3 3
result:
wrong answer 1st lines differ - expected: '3', found: '9'