SP1476 PROFIT - Maximum Profit

Description

CS&T, the well-known cellphone company, is going to set some new service stations among n possible ones, which are numbered 1,2,...,n. The costs of setting these stations are known as P1,P2,..,Pn. Also the company has made a survey among the cellphone users, and now they know that there are m user groups numbered 1,2,...,m, which will communicate by service station Ai and Bi, and the company can profit Ci. Now CS&T wants to know which service stations are to be set that the company will profit most.

Input Format

``` T [The number of tests] n m [n

Output Format

``` MaximumProfit [other tests] ```