Tag Archives: Maximum Score Solution

CodeChef : January Challenge 2018 – K-Concatenation

K-Concatenation Source: CodeChef You are given an array A with size N (indexed from 0) and an integer K. Let’s define another array B with size N · K as the array that’s formed by concatenating K copies of array A. For example, if A = {1, 2} and K = 3, then B = {1, 2, 1, 2, 1, 2}. You have to find the maximum subarray sum of the array B. Fomally, you should compute the maximum… Read More »

CodeChef : January Challenge 2018 – Maximum Score

Maximum Score Source: CodeChef You are given N integer sequences A1, A2, …, AN. Each of these sequences contains Nelements. You should pick N elements, each from one sequence; let’s denote the element picked from sequence Ai by Ei. For each i (2 ≤ i ≤ N), Ei should be strictly greater than Ei-1. Compute the maximum possible value of E1 + E2 + … + EN. If it’s impossible to pick the elements E1, E2, …, EN, print… Read More »