QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#582868#9375. TouristleiWA 0ms3704kbC++14651b2024-09-22 17:39:522024-09-22 17:40:00

Judging History

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

  • [2024-09-22 17:40:00]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3704kb
  • [2024-09-22 17:39:52]
  • 提交

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();
}

詳細信息

Test #1:

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

input:

5
1000 1000 1000 -5000 1000

output:

3

result:

ok single line: '3'

Test #2:

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

input:

5
20 -100 10 -150 5

output:


result:

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