\(B=x^3-3x^2+3xy^2+3x^2y+y^3-3y^2-6xy+3x+3y+2012\\ =\left(x+y\right)^3-3\left(x+y\right)^2+3\left(x+y\right)+2012\\ =\left[\left(x+y\right)^3-3\left(x+y\right)^3+3\left(x+y\right)-1\right]+2013\\ =\left(x+y-1\right)^3+2013\)thay x+y=101 vào ta có
\(B=\left(101-1\right)^3+2013=1002013\)