UPD: I suppose no. Thanks lrvideckis for explaining my mistake in this comment.
I think PQ takes too much memory because of what happened in CF Round 923.
In this contest, because of I couldn't solve E, I read F, after some time I found solution. In the end of my solution, I have to find any path from $$$mn.ss.ss$$$ to $$$mn.ss.ff$$$ which doesn't contain a node more than one time, in this code I used dijikstra for it(I don't know why I didn't use bfs). And it used more than 256 megabytes.
Today, I used bfs instead of dijikstra in this code, and I suprised, it took only 43 megabytes. In time 2, in memory 6 times smaller than previous code. I'm sad about I didn't use bfs in contest, but I'm happy about I learned a lesson.
Do you have any experience like these?
245612146
I fixed 2 bugs in your dijkstra: overflow, and you need to continue when distance in the dist array doesn't equal distance on the PQ
https://cp-algorithms.com/graph/dijkstra_sparse.html
actually, the not-continueing-bug I made once 35532768 and then switched to set implementation of dijkstras for a couple years then realized my mistake
Thanks, I didn't know it.