|
|||
ACLUnfortunately, even though your efforts were kinda successful, some AI bots were able to enter into our most secure servers and started to check our files. Who knows, maybe they will even download the ranking of the programming contest as well (which is totally not decided beforehand...ahem-ahem)! Luckily our system administrators were keen enough to set permissions for the sensitive files and folders, so the bots are not able to access everything. Your task is to decide the amount of "damage" caused by the bots by determining if they can access a given folder or not. InputThe input is a single line, ended with an end of line character. The structure of the line is the following:
Output
The output is the number 1 if the AI bot is able to
open the folder specified in the second part of the line and
the number 0 if not. The bot is able to open a folder
if that folder is in an "allow" state in the list (e.g. "books_allow"),
or if the * star allows it (e.g. "*_allow"). Important however that the
* character is overwritten by the specific entries, so e.g. "*_allow",
"books_deny" means that the bot can download everything except books.
Moreover the system administrators were a bit tired while setting these
permissions, so there can be conflicting entries, which always return a
"deny" state (e.g. "books_allow", "books_deny" translates to
"books_deny"). If the * character has a conflicting entry, then we also
translate it to "*_deny", however based on the above lines the specific
entries can overwrite this. Example
Input:
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |