QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#587244#9375. Tourist2023_ljdWA 0ms3552kbC++23364b2024-09-24 18:44:012024-09-24 18:44:01

Judging History

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

  • [2024-09-24 18:44:01]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3552kb
  • [2024-09-24 18:44:01]
  • 提交

answer

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

void solve() {
    int n , val=1500 , ans=0 ; cin >> n ;
    for(int i=1 ; i<=n ; i++) {
        int x ; cin >> x ;
        val += x ;
        if(!ans && val >= 4000 )    ans = i ;
    }
    cout << ans << endl ;
}

int main() {
    int t =1 ; //cin >> t ;
    while(t--)  solve() ;
    return 0 ;
}

詳細信息

Test #1:

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

input:

5
1000 1000 1000 -5000 1000

output:

3

result:

ok single line: '3'

Test #2:

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

input:

5
20 -100 10 -150 5

output:

0

result:

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