QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#621605#9375. Touristshine-me#WA 23ms3688kbC++17270b2024-10-08 15:38:352024-10-08 15:38:37

Judging History

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

  • [2024-10-08 15:38:37]
  • 评测
  • 测评结果:WA
  • 用时:23ms
  • 内存:3688kb
  • [2024-10-08 15:38:35]
  • 提交

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