문제 : https://www.acmicpc.net/problem/7785
코드
import sys
input = sys.stdin.readline
num = int(input())
name_list = {}
for i in range(num):
name, status = map(str, input().split())
if status == "enter":
name_list[name] = status
else:
del name_list[name]
rem = sorted(name_list, reverse = True)
for n in rem:
print(n)
'코딩테스트 > 백준 (python)' 카테고리의 다른 글
백준 / 1260번 / DFS와 BFS / DFS, BFS / python 파이썬 (0) | 2024.09.04 |
---|---|
백준 / 11047번 / 동전 0 / Greedy Algorithm / python 파이썬 (0) | 2024.09.03 |
백준 / 9012번 / 괄호 / python 파이썬 (0) | 2024.07.26 |
백준 / 1439번 / 뒤집기 / python 파이썬 (0) | 2024.07.16 |
백준 / 10815번 / 숫자 카드 / python 파이썬 (0) | 2024.06.11 |