Given two arrays X[] and Y[] of positive integers, find number of pairs such that x^y > y^x where x is an element from X[] and y is an element from Y[].
I need a time-efficient solution, thank you so much.
if you “need” it, seems like is something you should solve by yourself. If it a practice problem, please send the link to the statement
2 Likes
1 Like
you can get the editiorial
complexity=mlongn
1 Like
I could not give out the link because it was a teacher-assigned assignment, you understand for this reason
Hint : Plot the graph of x^{\frac{1}{x}}, should help a lot.