SP25924 CRICKDP - Cricket Selection
Description
Swagger loves playing cricket and his its his dream to represent his
Input Format
-First line contains number of test cases **T**.
-First line of each test case contains **3** space separated integer **N,K,M** denoting Number of matches he played,amount of money he has and number of judges he can bribe .
-Next line contains **N** space separated integers where **i $ ^{th} $** integer denotes rating of **i $ ^{th} $** match
-Next **M** lines of each test case contains three integers: **L,R** and **C** where the integers in the **i $ ^{th} $** line denotes value **L $ _{i} $** ,**R $ _{i} $** ,**C $ _{i} $** respectively.
Output Format
For each test case , print a single integer which is maximum possible sum in a new line