QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#588449#9375. TouristJTaoWA 0ms3644kbC++20571b2024-09-25 11:32:352024-09-25 11:43:29

Judging History

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

  • [2024-09-25 11:43:29]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3644kb
  • [2024-09-25 11:32:35]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e6 + 5;
const int mod = 998244353;

int n;
//int a[N];
void solve() {
    cin >> n;
    int ans = 1500;
    for (int i = 1; i <= n; i++) {
        int x;
        cin >> x;
        ans += x;
        if (x >= 4000) {
            cout << i << '\n';
            return;
        }
    }
    cout << -1 << '\n';
}
signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    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: 3644kb

input:

5
1000 1000 1000 -5000 1000

output:

-1

result:

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