Find Maximum S
CodeChefOpen on judge ↗
You are given an array A[] of size N. Let define the function S(i, j) (1 <= i < j <= N) as -  Find the maximum value of S among all the possible values. For exapmle - Let A[] = {4, -1, 5, 4} S(1, 2) = 9, maximum value is 9. ### Input The input consists of multiple test cases. The first line contains an i
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start