QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#582851 | #9375. Tourist | lei | WA | 0ms | 3684kb | C++14 | 646b | 2024-09-22 17:37:43 | 2024-09-22 17:37:47 |
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=0;
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: 3684kb
input:
5 1000 1000 1000 -5000 1000
output:
10 4 4 4 4
result:
wrong answer 1st lines differ - expected: '3', found: '10'