Suppose we have a square matrix $M=(1-z)A+zB$ where $A,B$ have integer entries from $\{0,1\}$ with $\det(A)+\det(B)=1$ and $\det(A),\det(B),per(A),per(B)\in\{0,1\}$ and we want to find $z\in[0,1]$ that maximizes $(\det(M)^2$, is there a way to do find whether $z>1/2$ or $z<1/2$ without calculating any determinants or permanents and doing only polynomially many arithmetic operations? If $z<1/2$ does it mean $z=0$ and if $z>1/2$ does it mean $z=1$ are the optimal values?
In addition if $\det(A)$ or $\det(B)$ is $1$ then the corresponding matrix when considered as biadjacency matrix represents a bipartite graph having exactly $1$ perfect matching.
Note $M$ has entries only from $\{0,1,z,1-z\}$.