I’m stuck at https://www.spoj.com/problems/PAIRDIV2/ I’ve solved the tutorial version but I can’t figure out the solution for this one. Can someone provide some hints and sources to study for this problem?