#K1246. Device Performance Evaluation
Device Performance Evaluation
Device Performance Evaluation
You are given \(D\) devices, each with \(M\) performance metrics. A device is considered successful if at least one of its metrics is greater than or equal to a provided threshold \(T\). Otherwise, the device is considered to have failed.
The task is to evaluate each device's success based on these metrics. Specifically, for each device, if there exists at least one metric \(m\) such that \(m \ge T\), then print SUCCESS
, otherwise print FAILURE
.
Note: All formulas are represented in \(\LaTeX\) format.
inputFormat
The input is provided via standard input and has the following format:
D M T v1,1 v1,2 ... v1,M v2,1 v2,2 ... v2,M ... vD,1 vD,2 ... vD,M
Where:
- \(D\) is the number of devices.
- \(M\) is the number of metrics per device.
- \(T\) is the threshold value such that a metric \(m\) is considered acceptable if \(m \ge T\).
- Each of the next \(D\) lines contains \(M\) integers representing the metrics for that device.
outputFormat
For each device, output a single line with either SUCCESS
or FAILURE
:
SUCCESS
: if at least one metric of the device satisfies \(m \ge T\).FAILURE
: otherwise.
The output should be printed to standard output, with each result on a new line.
## sample3 4 200
150 180 220 190
300 310 290 305
100 90 85 95
SUCCESS
SUCCESS
FAILURE
</p>