SP32683 ADAKOHL - Ada and Kohlrabi
Description
As you might already know, Ada the Ladybug is a farmer. She has a garden with kohlrabi. Each kohlrabi has assigned a quality, which is a number (possibly negative, since the kohlrabi might be rotten).
Ada wants to gather some kohlrabi so she wants to pick a line such that the sum of kohlrabi on the line is maximal. Can you help her to find such line?
Input Format
The first line of input containts **1 , the number of test-cases (anyway note that for biggest test-cases there will be only 1 test-case).**
The first line of each test-case contains **0 < N , the number of kohlrabi.**
The next **N** lines contains three integers **x, y, q: -10 $ ^{9} $ , the coordinates of kohlrabi and its quality (note that no two kohlrabil will grow on same coordinates).**
Output Format
For each test-case, print the best achieavable sum of qualities of kohlrabies on a single line.