#C10905. Inventory Shipment Validation

    ID: 40162 Type: Default 1000ms 256MiB

Inventory Shipment Validation

Inventory Shipment Validation

You are given a list of items. Each item has a name and three integers: the quantity shipped (\(Q\)), the previous inventory (\(I\)), and the recorded inventory level (\(L\)). Your task is to verify if for each item the following equation holds:

\(Q + I = L\)

If the equation holds, output "CORRECT" for that item; otherwise, output "ERROR". The problem is designed to test simple arithmetic checks and proper input-output handling in programming contests.

inputFormat

The input begins with an integer \(T\) on a single line, representing the number of items. The following \(T\) lines each contain an item's details: a string (the item name) followed by three integers \(Q\), \(I\), and \(L\), separated by spaces.

Example:

2
Apples 50 100 150
Oranges 15 80 95

outputFormat

For each test case, output \(T\) lines. Each line should contain either "CORRECT" or "ERROR" corresponding to whether the item satisfies \(Q + I = L\) or not.

Example:

CORRECT
CORRECT
## sample
2
Apples 50 100 150
Oranges 15 80 95
CORRECT

CORRECT

</p>