question from russian math olympiad Let $f(x,y)=\frac{1}{2}(x+y-1)(x+y-2)$ be a function of two positive integers. 
Prove that for any positive integer $z$ there exists a single pair $x,y$ such that
$f(x,y)=z$. 

Isn't this clearly wrong? E.g. for $z=5$, there can be no successive pairs of integers $a,a'$ such that $\frac{1}{2}aa'=5$?
Yes, the question as stated is incorrect.
From question we can form the equation 
$$z = 1/2(x+y-2)(x+y-1)$$

let $x+y = a$

$$2z = (a - 2)(a - 1)$$
$$2z = a^2 -3a + 2$$
$$a^2 -3a -2(z - 1)=0$$
apply
$b^2 - 4ac$;
 $9+8(z-1)$

Now the discriminant have to be greater than or equal to $0$.

Let $z = 1$ the smallest positive integer.
Since
$9&gt;0$
then any positive integer value for $z$ will satisfy
and the $x +y$ can be found;
hence proved;