As far as I know, the editorial for WKPLAN is not available. I was very interested in the problem but could not solve it. The only 3 people to solve it during the contest were @mcfx1, @rns5 and @yfzcsc so I ask everyone but especially those 3 to provide an explanation.
Here was my progress at the time which I had also written here:
I was able to show that given sum can be written as \displaystyle \sum_{n=1}^N \Big(f*h(n)\Big)\Big(n^p\Big)
Where * represents Dirichlet Convolution and h(n) counts the number of ways to chose m numbers such that their gcd is 1 and their lcm is n.
h can be written in terms of other common functions related to Dirichlet Convolution as h = \mu * \mu * d^m. Their meaning can be found in the wiki I linked.
And the whole sum written in terms of common functions is \displaystyle \sum_{n=1}^N (f*\mu *\mu *d^m)\cdot(Id_p)(n)\ where \cdot represents pointwise multiplication.