suggest some possible approach?

Revision en1, by shivam_360, 2023-06-03 13:41:06

we have given with an array of coordinate pairs in the form of (x,y) and an integer k, we have to find the number of pairs such that ((x1^x2)+(y1^y2))=k where (x1,y1) is first pair and (x2,y2) is second pair... also i<j, assume the length of the input array to be 10^5 and k can go up to 100..

i know it's some kind of map question where we have separate the relationship in form of x1,y1 and x2,y2 independently...but not able to come up with such relationship... can someone help me with some good approaches and also the intuition behind it... thank you!!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English shivam_360 2023-06-03 13:41:06 596 Initial revision (published)