THE GAME OF GOT
CodeChefOpen on judge ↗
$Saisha$ is trying to build a game on $Game$ $Of$ $Thrones$. She is stuck at following pseudo code. She wants to optimize the following code. You are given the Fire Power of N Dragons. ```c++ int result = 0, i = 1, j = 1; for i from $1$ to $N$ for j from $1$ to $N$ result = $max$( result , FirePower[i] - FirePower[j] ); print(result); ``` Help her to find the result
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