problem.txt (1540B)
1 - n cores 2 - 1 -> n numbered 3 - a_i is weight of ith core 4 - operation 5 - choose one core 6 - s.t. mass a_i >= 2 7 - split a_i into x,y s.t. x >= 1, y >= 1, x + y = a_i 8 - after splitting, remove the element, decrementing the total size of a 9 - x is added to left neighbor (if exists) 10 - y is added to right neighbor (if exists) 11 - Determine whether it is possible to end the process with exactly one core remaining. If it is possible, find the maximum possible mass of this single final core. 12 13 14 --- 15 16 - so basically perform the ops to maximize the size of one core at the end. 17 18 --- 19 20 4 21 1 2 3 4 22 23 remove 3 24 25 1 3 6 26 27 remove 3 28 29 2 8 30 31 remove 2 32 33 9 34 35 in this we added as much as possible to the larger element and the smallest amount to the smaller one. that doesn't seem quite right overall, but the idea that we only want to put 1 on the loss side when no left or right seems right. 36 37 --- 38 39 5 40 1 1 1 1 1 41 42 can't make any choices. 43 44 -1 45 46 47 --- 48 49 2 50 6 7 51 52 either way. 53 54 7 + 5 = 12 55 56 --- 57 58 idea: 59 - can we just decide that the left or right is correct based on which is smaller than do combinations on the interior to minimize left and maximize right (or whicever)? 60 61 - can we always just lose 1? 62 63 1 1 3 64 65 1 3 66 67 3 68 69 in this case we lose 2 overall 70 71 --- 72 73 can we combine smallest / largest possible at each step? 74 75 - can we combine smallest at each step? does order matter? 76 77 - can we just combine the central elements as much as possible? 78 - that seems right. 79 - combine central elements together until no more, than split largest into 1 and other 80