We analytically investigated the phase diagrams of one-dimensional Ising and XY models. A second-order phase transition occurs in both models only with the transverse magnetic field. In this study, the fully connected ferromagnetic and anti-ferromagnetic XX interactions are applied in addition to the transverse magnetic field. The ferromagnetic XX interaction causes a first-order phase transition in both of the one-dimensional Ising and XY models. In contrast, by applying the anti-ferromagnetic one, the second-order phase transition can be avoided in the one-dimensional Ising model, and the critical amplitude becomes smaller in the one-dimensional XY model even though the second-order phase transition remains and the critical exponent does not change. Because the anti-ferromagnetic XX interaction works to destroy the order of the transverse magnetization, it begins to decrease at a larger strength of the transverse magnetic field. As a result, the susceptibility of the transverse magnetization with respect to the strength of the magnetic field becomes small. It is conjectured that the anti-ferromagnetic XX interaction is generally preferable to the ferromagnetic interaction to improve the performance of quantum annealing.