, , , (1,1), , (x, y) (.. x < - → y).
, x^2 + y^2 = c, x <= sqrt(c) y <= sqrt(c). , x <= y, x <= sqrt(c/2) sqrt(c/2) <= y <= sqrt(c).
:
x^2+x^2 <= x^2 + y^2 = c x <= sqrt(c/2)x <= y y^2 <= x^2 + y^2 = c, sqrt(c/2) <= y <= sqrt(c)
, |sqrt(c)-sqrt(c/2)| < |sqrt(c/2)| c, y sqrt(c/2) sqrt(c), x , x^2+y^2=c.
int print(x,y) {
System.out.println(x+" "+y);
System.out.println(-x+" "+y);
System.out.println(-x+" "+-y);
System.out.println(x+" "+y);
}
int getCount(int c) {
if ( (c % 4) == 3)
return 0;
int count=0;
for(int y = Math.sqrt(c/2) ; y <= Math.sqrt() ; y++) {
int x = (int)Math.sqrt(c-y*y);
if(x*x + y*y == c){
count += 4;
print(x,y);
if(x != y) {
count += 4;
print(y,x);
}
}
}
}
, c = 1000*1000, 4n^2 (x,y), .. n = sqrt(c), 4 * 1000 * 1000 .
x sqrt (c) 1000 , 300 .