QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#585846#9375. TouristRetr00WA 0ms3608kbC++20442b2024-09-23 22:23:092024-09-23 22:23:10

Judging History

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

  • [2024-09-23 22:23:10]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3608kb
  • [2024-09-23 22:23:09]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n, sc = 1500;
    cin >> n;
    vector<ll> a(n);
    for (int i = 0; i < n; i++)
        cin >> a[i];
    for (int i = 0; i < n; i++)
    {
        sc += a[i];
        if (sc >= 4000)
        {
            cout << i + 1 << '\n';
            break;
        }
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5
1000 1000 1000 -5000 1000

output:

3

result:

ok single line: '3'

Test #2:

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

input:

5
20 -100 10 -150 5

output:


result:

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