Given that a and b are non-negative integers and f(x,y)=(x+y-a)(x+y-b), then if f(x,y)=0 has n distinct non-negative integer solutions for (x,y), find how many different polynomials f(x,y) can take.
Note: For example, (1,0) and (0,1) are not distinct solutions.
In general,
if n is even, there are 2n distinct polynomials
if n is odd, there are 2n - 1 distinct polynomials