class AbstractVFState extends State {

    @Override
    final boolean add(int n, int m) {
        if (!feasible(n, m)) return false;
        m1[n] = m;
        m2[m] = n;
        size = size + 1;
        for (int w : g1[n])
            if (t1[w] == 0) t1[w] = size;
        for (int w : g2[m])
            if (t2[w] == 0) t2[w] = size;
        return true;
    }

    public  AbstractVFState(final int[][] g1, final int[][] g2);

}