QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#585846 | #9375. Tourist | Retr00 | WA | 0ms | 3608kb | C++20 | 442b | 2024-09-23 22:23:09 | 2024-09-23 22:23:10 |
Judging History
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: ''