#K69722. Inefficient Server Identification
Inefficient Server Identification
Inefficient Server Identification
This problem requires you to determine inefficient servers based on their response times. Each server log contains a server identifier followed by several response time measurements. The task is to identify all servers whose average response time exceeds a given threshold.
The average response time for a server is computed using the formula:
$$ \text{avg} = \frac{\sum_{i=1}^{n} t_i}{n} $$
If no server meets the criterion, output None
.
inputFormat
The input is read from standard input (stdin) and has the following format:
- The first line contains an integer
n
which is the number of server logs. - The next
n
lines each contain a server log in the format:ServerID t1 t2 ... tn
whereServerID
is a string andt1, t2, ...
are floating-point numbers representing response times. - The last line contains a floating-point number representing the threshold average response time.
outputFormat
Output a single line to standard output (stdout). If there is at least one server whose average response time strictly exceeds the threshold, print their identifiers separated by a single space. Otherwise, print the string None
.
1
SERVER1 0.5 0.8 1.0 1.5
1.6
None