Task allocation is a kind of key technology in the application of multi-UAVs systems, and it is a mutually exclusive multi-dimensions optimal problem. Mixed integer linear program is applied to build the optimal function, and particle swarm optimization(PSO) algorithm is utilized for searching the best solution in order to realize the task allocation of multi-UAVs system. In the PSO algorithm, it is necessary to make some modification to suit for the acquirement of mutually exclusive. The numerical simulation shows that the presented algorithm can find the optimal solution rapidly and accomplish the task allocation of multi-UAVs efficiently.