A finite algorithm for a particular d.c. quadratic programming problem