Efficient construction of 3-substituted-quinazolin-4(3H)-ones and theoretical investigation on the reaction pathways