-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ee1581
commit 343c40c
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# About this solution | ||
|
||
This solution has scored 100 in [Quera](https://quera.org/). | ||
|
||
🌟 If you like this solution, please give it a star. | ||
|
||
## Built With | ||
|
||
Python 3 | ||
|
||
# Usage | ||
|
||
`python3 program.py` | ||
|
||
## Support | ||
|
||
Reach out to the maintainer at one of the following places: | ||
|
||
- [GitHub issues](https://github.com/HamidMolareza/QueraProblems/issues/new?assignees=&labels=question&template=04_SUPPORT_QUESTION.md&title=support%3A+) | ||
|
||
## Authors & contributors | ||
|
||
The original setup of this repository is by [Hamid Molareza](https://github.com/HamidMolareza). | ||
|
||
## License | ||
|
||
This solution is licensed under the [GPLv3](https://choosealicense.com/licenses/gpl-3.0/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
def get_inputs(num_of_lines: int) -> dict[str, str]: | ||
"""Reads input lines and creates a dictionary mapping binary to label.""" | ||
return dict(input().split() for _ in range(num_of_lines)) | ||
|
||
|
||
def main(): | ||
"""Main function to process the dataset and handle queries.""" | ||
n, q, _ = map(int, input().split()) # Simplified input parsing | ||
dataset = get_inputs(n) # Populate the dataset | ||
|
||
for _ in range(q): | ||
query = input() | ||
print(dataset.get(query, "Unknown")) # Use `get` for safe lookups | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |