y^2=x+np 0<x<p ,0<y<p
故 n in {0,1,2,p-1}
so just compute the square number in [p,p*p], they are p^2, (p-1)^2, (p-2)^2 ...
then u can get a list of square number
for square[i];
n= [square[i]/p] , x=square[i]-n*p;
they are all right result , so the total result number is equal to p, so the complexity is O(p), but p is so big, so if you want all result the complexity
must be this.