#K80957. Truck Weight Monitoring

    ID: 35645 Type: Default 1000ms 256MiB

Truck Weight Monitoring

Truck Weight Monitoring

You are tasked with monitoring the daily weights of trucks transporting goods. For each day, you will be given the number of trucks \(N\) and the fixed weight limit for each truck \(W\). Each truck carries a certain weight. For any truck carrying more than \(W\), the excess weight \((w - W)\) is considered a violation. The overall violation for the day is the sum of all individual excess weights.

If no truck exceeds the weight limit, output NO VIOLATION. Otherwise, output VIOLATION X where \(X\) is the total excess weight.

inputFormat

The input begins with an integer \(T\), the number of test cases. Each test case is described by two lines:

  • The first line contains two integers \(N\) (the number of trucks) and \(W\) (the weight limit for each truck).
  • The second line contains \(N\) integers, where each integer represents the weight of a truck.

outputFormat

For each test case, print a single line. If every truck's weight does not exceed \(W\), print NO VIOLATION. If one or more trucks exceed \(W\), print VIOLATION X where \(X\) is the total amount by which the trucks exceed the weight limit.

## sample
1
3 1000
800 1200 950
VIOLATION 200

</p>