<jupyter_start><jupyter_text>2021년 7월 1일 목요일 BaekJoon - 회사에 있는 사람 (Python) 문제 : https://www.acmicpc.net/problem/7785 블로그 : https://somjang.tistory.com/entry/BaekJoon-7785%EB%B2%88-%ED%9A%8C%EC%82%AC%EC%97%90-%EC%9E%88%EB%8A%94-%EC%82%AC%EB%9E%8C-Python  Solution 1<jupyter_code>def company_people(access_record):
    record_dict = {}
    
    for access in access_record:
        name, status = access.split()
        
        if status == "enter":
            record_dict[name] = status
        else:
            del record_dict[name]
        
    return sorted(list(record_dict.keys()), reverse=True)

if __name__ == "__main__":
    access_record = []
    for _ in range(int(input())):
        access = input()
        access_record.append(access)
        
    people = company_people(access_record)
    
    for person in people:
        print(person)<jupyter_output><empty_output><jupyter_text>Solution 2<jupyter_code>def company_people(access_record):
    record_dict = {}
    
    for access in access_record:
        name, status = access.split()
        record_dict[name] = status        
        
    return sorted([record[0] for record in record_dict.items() if record[1] == "enter"], reverse=True)

if __name__ == "__main__":
    access_record = []
    for _ in range(int(input())):
        access = input()
        access_record.append(access)
        
    people = company_people(access_record)
    
    for person in people:
        print(person)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12348993288590604, 'fraction_numerical': 0.026174496644295303, 'mean_word_length': 2.8828125, 'pattern_counts': {'":': 3, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '331528', 'license': 'MIT', 'n_tokens_mistral': 540, 'n_tokens_neox': 530, 'n_words': 91, 'path': 'DAY 401 ~ 500/DAY411_[BaekJoon] 회사에 있는 사람 (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '1490'}