QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#621605 | #9375. Tourist | shine-me# | WA | 23ms | 3688kb | C++17 | 270b | 2024-10-08 15:38:35 | 2024-10-08 15:38:37 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n , sum = 1500 , flag = 1 , x;
int main(){
cin >> n;
for(int i = 0;i < n; ++i){
cin >> x;
sum += x;
if(sum >= 4000){
cout << i + 1 << endl;
flag = 0;
}
}
if(flag) cout << -1;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3684kb
input:
5 1000 1000 1000 -5000 1000
output:
3
result:
ok single line: '3'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
5 20 -100 10 -150 5
output:
-1
result:
ok single line: '-1'
Test #3:
score: -100
Wrong Answer
time: 23ms
memory: 3620kb
input:
100000 -622469318 539497462 -644931120 58116512 -531587090 908494982 839175844 702577848 -359659596 -940595076 -625597008 475756588 -944333680 -836413428 15282479 465161640 368734488 -915470952 168906352 507919069 -120921946 69204544 -142419900 -256757690 -773656014 194185932 398352052 550384408 -45...
output:
7 8 9 25 26 35 36 37 38 39 40 51 52 56 59 60 65 71 73 74 75 76 78 83 91 93 94 95 96 97 98 103 104 105 106 107 108 109 110 111 114 115 116 117 118 119 120 121 122 123 124 125 126 127 130 131 132 133 134 135 138 140 141 142 143 144 145 146 147 154 156 157 162 163 164 165 168 171 172 173 174 175 176 17...
result:
wrong output format Extra information in the output file