← All problemsSign in

Mathematical Equation

Problem Statement: Prakhar is fond of solving the mathematical equations,one day his girlfriend asked him a new equation to solve.Equation is as follows: K*(K+1) = 4*A*B + 2*max(A,B) She also gives him an array(A) of pair(A,B) of size N,and asks Q queries,in each query she gives the value of K and asks for the number of pairs which is present in the array(A) and satisfies the given equation for

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start