Task: | Metsämetro |
Sender: | Ilmari2000 |
Submission time: | 2018-01-18 14:48:04 +0200 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.05 s | 1 | details |
#2 | WRONG ANSWER | 0.05 s | 1 | details |
#3 | WRONG ANSWER | 0.03 s | 1 | details |
#4 | WRONG ANSWER | 0.04 s | 1 | details |
#5 | WRONG ANSWER | 0.05 s | 1 | details |
#6 | WRONG ANSWER | 0.04 s | 1 | details |
#7 | WRONG ANSWER | 0.04 s | 1 | details |
#8 | WRONG ANSWER | 0.03 s | 1 | details |
#9 | WRONG ANSWER | 0.04 s | 1 | details |
#10 | WRONG ANSWER | 0.03 s | 1 | details |
#11 | WRONG ANSWER | 0.05 s | 2 | details |
#12 | WRONG ANSWER | 0.05 s | 2 | details |
#13 | WRONG ANSWER | 0.05 s | 2 | details |
#14 | WRONG ANSWER | 0.05 s | 2 | details |
#15 | WRONG ANSWER | 0.04 s | 2 | details |
#16 | WRONG ANSWER | 0.04 s | 2 | details |
#17 | WRONG ANSWER | 0.04 s | 2 | details |
#18 | WRONG ANSWER | 0.04 s | 2 | details |
#19 | WRONG ANSWER | 0.03 s | 2 | details |
#20 | WRONG ANSWER | 0.06 s | 2 | details |
#21 | WRONG ANSWER | 0.20 s | 3 | details |
#22 | WRONG ANSWER | 0.24 s | 3 | details |
#23 | WRONG ANSWER | 0.23 s | 3 | details |
#24 | WRONG ANSWER | 0.21 s | 3 | details |
#25 | WRONG ANSWER | 0.21 s | 3 | details |
#26 | WRONG ANSWER | 0.22 s | 3 | details |
#27 | WRONG ANSWER | 0.22 s | 3 | details |
#28 | WRONG ANSWER | 0.20 s | 3 | details |
#29 | WRONG ANSWER | 0.21 s | 3 | details |
#30 | WRONG ANSWER | 0.21 s | 3 | details |
Code
#include <cmath> #include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; long long int minmax = 0, maxmax = 0; vector<long long int> nums; nums.resize(n); long long int mini1 = 0, mini2 = 0, maxi1 = 0, maxi2 = 0; vector<long long int> miniV1, maxiV1, miniV2, maxiV2; miniV1.resize(n); maxiV1.resize(n); miniV2.resize(n); maxiV2.resize(n); for(int i = 0; i < n; i++) cin >> nums[i]; for(int i = 0; i < n; i++) { maxi1 += nums[i]; maxi2 += nums[n - i - 1]; mini1 = abs(mini1 - nums[i]); mini2 = abs(mini2 - nums[n - i - 1]); miniV1[i] = mini1; maxiV1[i] = maxi1; miniV2[n - i - 1] = mini2; maxiV2[n - i - 1] = maxi2; } miniV2.push_back(0); maxiV2.push_back(0); for(int i = 0; i < n; i++) { cout << maxiV1[i] << " " << maxiV2[i + 1] << ", " << miniV1[i] << " " << miniV2[i + 1] << endl; maxmax = max(maxmax, min(maxiV1[i], maxiV2[i + 1])); minmax = max(minmax, min(miniV1[i], miniV2[i + 1])); } cout << minmax << " " << maxmax << endl; }
Test details
Test 1
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 9 4 9 7 6 10 4 6 2 9 |
correct output |
---|
9 31 |
user output |
---|
9 57, 9 1 13 53, 5 3 22 44, 4 6 29 37, 3 1 35 31, 3 7 ... |
Test 2
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 5 6 3 5 6 3 4 7 1 10 |
correct output |
---|
10 25 |
user output |
---|
5 45, 5 3 11 39, 1 3 14 36, 2 0 19 31, 3 5 25 25, 3 1 ... |
Test 3
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 10 2 4 1 4 9 6 3 5 10 |
correct output |
---|
10 24 |
user output |
---|
10 44, 10 2 12 42, 8 4 16 38, 4 0 17 37, 3 1 21 33, 1 5 ... |
Test 4
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 7 5 1 3 8 4 5 4 6 3 |
correct output |
---|
7 22 |
user output |
---|
7 39, 7 1 12 34, 2 4 13 33, 1 5 16 30, 2 8 24 22, 6 0 ... |
Test 5
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 10 7 8 4 10 6 8 6 2 3 |
correct output |
---|
10 29 |
user output |
---|
10 54, 10 2 17 47, 3 5 25 39, 5 3 29 35, 1 7 39 25, 9 3 ... |
Test 6
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 1 2 8 2 3 1 3 1 4 9 |
correct output |
---|
9 17 |
user output |
---|
1 33, 1 5 3 31, 1 7 11 23, 7 1 13 21, 5 3 16 18, 2 0 ... |
Test 7
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 2 8 2 5 8 8 5 10 9 7 |
correct output |
---|
7 31 |
user output |
---|
2 62, 2 8 10 54, 6 0 12 52, 4 2 17 47, 1 3 25 39, 7 5 ... |
Test 8
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 2 10 4 8 10 10 9 3 9 7 |
correct output |
---|
8 34 |
user output |
---|
2 70, 2 6 12 60, 8 4 16 56, 4 0 24 48, 4 8 34 38, 6 2 ... |
Test 9
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 10 7 9 1 7 8 4 4 1 5 |
correct output |
---|
10 27 |
user output |
---|
10 46, 10 0 17 39, 3 7 26 30, 6 2 27 29, 5 3 34 22, 2 4 ... |
Test 10
Group: 1
Verdict: WRONG ANSWER
input |
---|
10 1 4 7 7 3 1 10 6 4 3 |
correct output |
---|
5 23 |
user output |
---|
1 45, 1 3 5 41, 3 1 12 34, 4 6 19 27, 3 1 22 24, 0 4 ... |
Test 11
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 5 3 4 7 5 1 7 1 6 10 2 9 6 5 9... |
correct output |
---|
6 281 |
user output |
---|
5 565, 5 1 8 562, 2 2 12 558, 2 6 19 551, 5 1 24 546, 0 6 ... |
Test 12
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 3 9 7 3 6 6 4 3 1 8 2 4 2 6 2 ... |
correct output |
---|
7 252 |
user output |
---|
3 501, 3 3 12 492, 6 6 19 485, 1 1 22 482, 2 2 28 476, 4 4 ... |
Test 13
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 8 2 3 4 8 3 2 7 10 10 3 2 3 4 ... |
correct output |
---|
8 252 |
user output |
---|
8 498, 8 2 10 496, 6 0 13 493, 3 3 17 489, 1 7 25 481, 7 1 ... |
Test 14
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 4 4 9 8 5 6 2 3 7 10 10 2 7 5 ... |
correct output |
---|
9 261 |
user output |
---|
4 524, 4 2 8 520, 0 2 17 511, 9 7 25 503, 1 1 30 498, 4 4 ... |
Test 15
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 7 3 3 5 10 6 6 8 10 5 5 8 3 5 ... |
correct output |
---|
10 300 |
user output |
---|
7 599, 7 3 10 596, 4 0 13 593, 1 3 18 588, 4 8 28 578, 6 2 ... |
Test 16
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 9 5 2 1 9 8 6 4 1 6 3 5 3 1 4 ... |
correct output |
---|
9 289 |
user output |
---|
9 577, 9 1 14 572, 4 4 16 570, 2 6 17 569, 1 7 26 560, 8 2 ... |
Test 17
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 9 7 5 5 4 1 9 2 3 5 10 2 10 5 ... |
correct output |
---|
9 287 |
user output |
---|
9 571, 9 3 16 564, 2 4 21 559, 3 1 26 554, 2 4 30 550, 2 8 ... |
Test 18
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 3 8 5 10 8 10 9 2 8 3 1 2 9 7 ... |
correct output |
---|
6 282 |
user output |
---|
3 571, 3 5 11 563, 5 3 16 558, 0 8 26 548, 10 2 34 540, 2 6 ... |
Test 19
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 6 3 9 2 8 7 8 4 6 4 4 10 2 10 ... |
correct output |
---|
8 260 |
user output |
---|
6 518, 6 0 9 515, 3 3 18 506, 6 6 20 504, 4 8 28 496, 4 0 ... |
Test 20
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 10 8 7 8 10 3 1 2 1 1 7 4 5 5 ... |
correct output |
---|
10 279 |
user output |
---|
10 550, 10 2 18 542, 2 6 25 535, 5 1 33 527, 3 9 43 517, 7 1 ... |
Test 21
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 917855934 394938644 81692499 4... |
correct output |
---|
917855934 23490295363738 |
user output |
---|
917855934 46980303312760, 9178... |
Test 22
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 898177957 193852227 11785863 3... |
correct output |
---|
898177957 23488890808371 |
user output |
---|
898177957 46977095943955, 8981... |
Test 23
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 560743028 996665755 25721760 4... |
correct output |
---|
576170439 23599624330076 |
user output |
---|
560743028 47199308448504, 5607... |
Test 24
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 836491959 800539061 666447484 ... |
correct output |
---|
836491959 23450143338851 |
user output |
---|
836491959 46900227741903, 8364... |
Test 25
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 156445358 170997055 927078622 ... |
correct output |
---|
930838017 23503313036290 |
user output |
---|
156445358 47006627823594, 1564... |
Test 26
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 869942654 614144284 154904581 ... |
correct output |
---|
869942654 23544105883410 |
user output |
---|
869942654 47087412392858, 8699... |
Test 27
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 471025024 244072220 419574192 ... |
correct output |
---|
657776925 23597080152723 |
user output |
---|
471025024 47194129431770, 4710... |
Test 28
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 561299091 285120535 109702008 ... |
correct output |
---|
862325964 23517085653307 |
user output |
---|
561299091 47033720634983, 5612... |
Test 29
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 356879006 3017698 603259365 18... |
correct output |
---|
499995467 23540251578008 |
user output |
---|
356879006 47080780674006, 3568... |
Test 30
Group: 3
Verdict: WRONG ANSWER
input |
---|
100000 190109479 83895435 595795373 8... |
correct output |
---|
598676555 23565408317817 |
user output |
---|
190109479 47130707181907, 1901... |