The traditional particle swarm optimization algorithms have some shortcomings, such as low convergence precision, slow convergence speed, and susceptibility to falling into local optima when solving complex optimization problems. To address these issues, this paper proposes a new particle swarm optimization algorithm that incorporates teamwork. Specifically, we introduce the concept of teamwork, and divide the particles into multiple teams and selecting team leaders. The particles can fully utilize the team's prompt information to guide the search process. The team leader updates the search direction of its particles through the generation of information factors, thus giving the algorithm better global search capabilities. The position and behavior of the team leader affect the search behavior of other particles, reducing the risk of falling into local optimal solutions. In addition, to further improve the algorithm's efficiency, we propose adaptive adjustment of information factors and learning factors. This adaptive adjustment mechanism enables the algorithm to adjust parameters flexibly according to the characteristics of the problem and the current search state, thereby accelerating convergence speed and improving convergence precision. To verify the performance of the proposed algorithm, we make an empirical analysis on 27 different test functions, the shortest path problem and the optimal SINR value problem for UAV deployment. The experimental results show that the proposed algorithm has obvious advantages in convergence accuracy and convergence speed. Compared with other algorithms, this algorithm can find a better solution faster and converge to the global optimal solution more stably.