Attack Of Titans
CodeChefOpen on judge ↗
Attack of Titans Vinitra wanted to watch attack of the Titans. Her dad hates anime. He has asked Vinitra to solve a problem in order to watch the anime. Vinitra is given a tree of N nodes. Node 1 is the root. Each node has a value assigned to it. Vinitra has to perform two queries on the tree: - Query 1: find and print sum of all values of all nodes on a path from node u to v. It is of the form
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