QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#588449 | #9375. Tourist | JTao | WA | 0ms | 3644kb | C++20 | 571b | 2024-09-25 11:32:35 | 2024-09-25 11:43:29 |
Judging History
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'