1
2
3
4
5
6
7
8
9
10
|
tmp=[]
for i in range(int(input())):
a,b=map(str, input().split())
if b=='enter' :
tmp.append(a)
elif b=='leave':
tmp.remove(a)
for i in sorted(tmp,reverse=True):
print (i)
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 11004 k번째 수 (0) | 2021.12.06 |
---|---|
백준 10867 중복 빼고 정렬하기 (0) | 2021.12.06 |
백준 5800 성적 통계 (0) | 2021.12.06 |
백준 5671 호텔 방 번호 (0) | 2021.12.06 |
백준 5635 생일 (0) | 2021.12.06 |
댓글