QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#582853#9375. TouristleiWA 0ms3584kbC++14649b2024-09-22 17:38:112024-09-22 17:38:15

Judging History

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

  • [2024-09-22 17:38:15]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3584kb
  • [2024-09-22 17:38:11]
  • 提交

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'