Help in debugging box stacking problems

Hi
its LIS version of box stacking implementation I have taken reference from gfg. The problem is it passes all test cases but fails in all test cases except tet 5th.
https://pastebin.com/L759LRs7

Hey Manoranjan!,
maintain vector of pair<area_of_box,height_of_box>
for each box there are 3 entries-- <lh,w> , <hw,l> , <l*w,h>, after that sort the vector.
Now you just have to add maximum of height offered by every distinct area(since same areas can’t be taken twice).

Hi can you guide why this fails

boxes.push_back({h,max(l,w),min(l,w)});
you should have done this for your first push_back also!

Hey great thanks : )