Company: Hashedin_3nov
Difficulty: medium
Anomalous Pairs in Alert Array Problem Description A network monitoring center records alert levels from various sensors at successive time intervals. Each alert level is represented by an integer value. Due to the high volume of data, the monitoring system needs an efficient way to detect anomalies in the alert stream. An anomaly, in this context, is defined as a pair of time indices (i, j) with i < j where the alert level at time i is strictly greater than three times the alert level at time j. Your task is to compute the total number of anomalous pairs in the alert array. Input: The first input line contains a single integer N, representing the number of alerts recorded. (1 ≤ N ≤ 10 5 ) The second input line contains N space-separated non-negative integers. Each integer represents the alert level at a specific time and is in the range [0, 10 9 ]. Output: Output a single integer which is the total count of anomalies where an anomaly is defined as a pair of indices (i, j) wit