QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#582868 | #9375. Tourist | lei | WA | 0ms | 3704kb | C++14 | 651b | 2024-09-22 17:39:52 | 2024-09-22 17:40:00 |
Judging History
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();
}
Details
Tip: Click on the bar to expand more detailed information
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: ''