← 返回 amazon 的题目列表User Access Website
类型:online_judge
Implement the following three methods to manage user accesses to the website:
add_username(username: str) -> None: Add a username who visited the website.
get_oldest_unique_user() -> str: Return the oldest username among those who have visited the website only once.
get_all_unique_users() -> List[str]: Return a list of all usernames who have visited the website only once.
You can assume that all usernames are strings, and the number of operations won't exceed 10^5.
Please implement these methods.
Example
Input
add_username('alice')
add_username('bob')
add_username('alice')
add_username('eve')
print(get_oldest_unique_user())
print(get_all_unique_users())