7 teams scored 231 points on this task, for a maximum score of 58, an average score of 33 and a median score of 19.
Bence is casually walking in the park when he stumbles over something. When he looks down he is stunned, he stumbled over two arrays! The first array A contains N integers while the second array B contains M positive integers. Bence wants to take revenge on the arrays and destroy them. However, he wants to destroy them in a very specific way: he wants to split each array into K non-empty contiguous subarrays, such that the sum of elements within each corresponding pair of subarrays is precisely the same. More formally, Bence wants to partition A into subarrays X_0, …, X_K-1 and B into subarrays Y_0, …, Y_K-1, such that the sum of elements in X_i equals the sum of elements in Y_i for each i=0… K-1. Help Bence to find such a partition, or tell him if it is impossible.