By Erianderson Oliveira, IFPI - Instituto federal do Piauí Brazil
Birinho works in a company that provides monitoring for the servers of its clients, its function is to monitor such servers, such as disk space, memory, cpu, etc.
The company system works with threshold, where, for example, when a 100 Gb hard drive reaches a 70% mark used (30% free) a "Warning" alarm is generated, and when the disk reaches 90 % of use (10% free) generates a "Critical" alarm. But Birinho ended up unconfiguring the threshold of the system, and his function now is to help him reconfigure this threshold for the company to continue its activities.
Each test case consists of four integers T (>= 1 T <= 104), A (>= 1 A <= T), W (>= 1 W <= 80) e C (>= 1 C <= 99), representing respectively the total disk size (in GB), the disk storage used (in GB), the percentage of the threshold for warning and the percentage of the threshold for critical.
The output should display a "warning" message (without quotes) if the disk space is within the threshold for warning, "critical" (without quotes) if the disk space is within the threshold for critical, and finally message "OK" (without quotes and in upper case) if the disk space is not within the established limits.
Input Sample | Output Sample |
100 75 70 90 99999 95000 50 90 100 89 90 91 |
warning critical OK |