Maximum Sum Triplet
CodeChefOpen on judge ↗
You are given a **rooted tree** with **N nodes and node 1 is the root of the tree**. Each node **i** has a value **Vi** associated with it. There are **3 nodes a,b,c where a is ancestor of b and a and b are ancestors of c** and $Va < Vb < Vc $ and **Va+Vb+Vc** is **maximum**. Output that maximum sum. ###Input: -First line contains total number of testcases. -First line of each testcase conta
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