Ordered CIDR Firewall

Implement an ordered IPv4 CIDR firewall.

Given an ordered list of rules, where each rule contains a CIDR (or a bare IPv4 address) and a status, implement:

get_status(rules, ip) -> str

...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: