Examples
Input: ("10.0.0.0/24", [("allow", "10.0.0.0/25"), ("allow", "10.0.0.128/25")])
Expected Output: True
Explanation: The first allow removes the lower half of the /24, and the second removes the upper half, so nothing remains.
Input: ("10.0.0.0/24", [("allow", "10.0.0.0/25")])
Expected Output: False
Explanation: Only the first 128 IPs are removed. The upper half of the target still remains.
Input: ("192.168.1.0/24", [("allow", "192.168.1.0/25"), ("deny", "192.168.1.128/26"), ("allow", "192.168.1.128/25")])
Expected Output: False
Explanation: After removing the lower half, the remaining region is `192.168.1.128/25`. The deny rule overlaps part of that remaining region, so the answer is immediately False.
Input: ("10.0.0.0/24", [("allow", "10.0.0.0/25"), ("deny", "10.0.0.0/26"), ("allow", "10.0.0.128/25")])
Expected Output: True
Explanation: The deny rule only touches addresses already removed by the first allow, so it does not overlap the current remaining region. The final allow removes the rest.
Input: ("10.0.0.0/24", [("allow", "10.0.0.64/26"), ("allow", "10.0.0.0/26"), ("allow", "10.0.0.128/25")])
Expected Output: True
Explanation: The first allow removes the middle quarter and splits the remaining region into two pieces. The next two allows remove both pieces completely.
Input: ("0.0.0.0/0", [])
Expected Output: False
Explanation: With no rules, the target is never canceled, so the remaining region is not empty.
Input: ("10.0.1.5/24", [("allow", "10.0.1.200/25"), ("allow", "10.0.1.1/25")])
Expected Output: True
Explanation: Both CIDRs are interpreted by prefix, so they cover the upper and lower halves of `10.0.1.0/24`. Together they remove the whole target.