QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#225436#1697. Balance Beampaul20080 2ms3936kbC++14403b2023-10-24 17:28:022023-10-24 17:28:02

Judging History

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

  • [2023-10-24 17:28:02]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3936kb
  • [2023-10-24 17:28:02]
  • 提交

answer

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

const int N=1005;
const double eps=1e-6;

long long a[N];

int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%lld",&a[i]);

	for(int i=1;i<=n;i++)
	{
		double ans=0;
		for(int l=1;l<i;l++)
			for(int r=i+1;r<=n;r++)
				ans=max(ans,(double)(a[l]*(r-i)+a[r]*(i-l))/(r-l));

		printf("%lld\n",ans*100000+eps);
	}
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3928kb

input:

2
1
3

output:

2
0

result:

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

Test #2:

score: 0
Runtime Error

input:

100000
10550
10166
14944
34729
60262
25398
4608
4103
101193
91415
63390
56440
54875
168733
55861
115845
204889
86170
228991
45049
188746
174299
157006
230942
301295
28758
261824
283112
3483
361548
373598
385647
261775
110588
350711
61727
397275
359292
469989
100405
262091
249753
383032
300999
521216...

output:


result:


Test #3:

score: 0
Runtime Error

input:

100000
96
69
618
440
1643
2449
2117
73
470
4080
1853
1106
2589
4981
6118
4134
4702
3077
2592
8155
8562
6144
9375
5120
3709
18
11000
11405
8836
12214
11637
5468
10706
11093
14235
9866
15042
12766
15586
14034
11827
17058
10880
17863
15006
11739
15698
307
6830
17584
2846
21082
14912
21886
6967
7840
110...

output:


result:


Test #4:

score: 0
Wrong Answer
time: 2ms
memory: 3936kb

input:

200
86857
23812
79982
44721
28718
48332
86220
19866
23758
48884
24781
92876
58394
30676
50939
1246
77228
69833
9109
556
16565
75867
28884
59093
85906
14369
45990
60314
18861
30445
70991
5717
54256
50973
66796
99332
99297
53016
19197
39420
1899
60337
48662
60285
91012
15966
61531
68233
85791
87005
68...

output:

200
200
199
198
197
196
195
194
193
192
191
190
189
188
187
186
185
184
183
182
181
180
179
178
177
176
175
174
173
172
171
170
169
168
167
166
165
164
163
162
161
160
159
158
157
156
155
154
153
152
151
150
149
148
147
146
145
144
143
142
141
140
139
138
137
136
135
134
133
132
131
130
129
128
127
...

result:

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

Test #5:

score: 0
Runtime Error

input:

5000
72083
34770
50448
76733
68071
44356
12800
25882
23411
61847
16071
72060
55263
60945
34424
53020
42724
63542
67935
83270
33043
38718
83427
34388
62968
70173
21833
51799
79193
53222
42211
67634
87991
9024
60726
72427
53373
89884
14667
93149
51730
30731
81567
6986
91668
15990
76371
50757
95891
443...

output:


result:


Test #6:

score: 0
Runtime Error

input:

100000
42613
39648
57462
23706
42581
34382
11589
50774
50931
75743
25387
27284
87003
6993
79687
62698
48230
55958
56398
32739
15357
23709
43837
63327
75293
19706
99184
8645
97561
7812
79584
40173
63825
53405
63879
6405
87786
91833
73537
55075
83934
98924
98725
70936
22282
78411
49993
86870
34369
639...

output:


result:


Test #7:

score: 0
Runtime Error

input:

100000
126
176
450
531
845
960
230
2029
2013
2441
393
898
2963
396
737
1576
4686
4531
2548
2752
2937
3500
5263
3681
4832
139
6997
7064
6827
1909
996
2040
10621
7628
9694
2289
5908
5695
1652
12862
2098
5532
10892
8000
10477
14202
1137
306
4843
14167
4747
270
6973
12124
1864
8646
5054
11755
14676
8514...

output:


result:


Test #8:

score: 0
Runtime Error

input:

100000
76
320
230
1049
962
705
1290
1673
1370
572
873
3333
1530
3522
2985
4212
937
3528
3357
3933
6327
2801
5408
2537
1003
391
6600
6753
1950
4710
2494
3941
3426
6421
7121
7049
4959
8943
4434
1871
6061
528
7278
1237
6495
13185
9374
273
10115
9355
11733
4274
7866
16015
7578
12801
12699
9034
6295
1159...

output:


result:


Test #9:

score: 0
Runtime Error

input:

100000
285
1191
4032
4253
2028
6342
6259
129
12406
10505
1861
7574
7081
13668
20727
13386
18752
17757
26939
12650
7879
6210
28257
21004
28122
36862
103
26569
7459
40624
12927
12953
26705
18007
37564
38149
13381
9977
51047
50996
38898
13414
59125
36150
15396
49423
20199
1043
5212
62121
63394
33190
56...

output:


result:


Test #10:

score: 0
Runtime Error

input:

100000
3700
2515
19050
13718
42454
50943
15036
21588
17968
63237
68840
49149
110365
44575
118371
118979
138079
110883
128494
99640
146984
60252
166941
100574
30480
154004
219764
151278
163270
4936
62463
187683
57978
207856
276102
128289
122059
109461
331073
329012
312878
348679
289155
120329
119050
...

output:


result:


Test #11:

score: 0
Runtime Error

input:

100000
234
72
826
1282
2883
6351
9173
4949
12623
4562
8352
9630
15317
17653
5224
17730
22248
11805
14165
9730
21425
935
21759
33803
31229
1903
13560
42166
1775
8762
8291
15655
15439
11824
27529
54213
21905
3239
31119
20433
22022
37367
42523
4878
40568
49055
61970
53282
17789
39217
76800
6074
7198
73...

output:


result: