diff --git a/wkdghdwns199/ACM-25192.py b/wkdghdwns199/ACM-25192.py new file mode 100644 index 0000000..22d787c --- /dev/null +++ b/wkdghdwns199/ACM-25192.py @@ -0,0 +1,19 @@ +import sys +input = sys.stdin.readline +N = int(input()) +emoji_using_users = set() +time_for_emoji_use = False +emoji_use_count = 0 +for _ in range(N): + chat_string = input().rstrip() + if chat_string == 'ENTER' : + if time_for_emoji_use : + emoji_use_count += len(emoji_using_users) + else : + time_for_emoji_use = True + emoji_using_users = set() + else : + emoji_using_users.add(chat_string) + +emoji_use_count+=len(emoji_using_users) +print(emoji_use_count) \ No newline at end of file diff --git a/wkdghdwns199/README.md b/wkdghdwns199/README.md index 7f68289..b9791e3 100644 --- a/wkdghdwns199/README.md +++ b/wkdghdwns199/README.md @@ -20,4 +20,5 @@ | 16차시 | 2024.03.23 | 조합론 | 이항 계수 1 | 2024.03.23 | | 17차시 | 2024.03.27 | DP | 신나는 함수 실행 | 2024.03.27 | | 18차시 | 2024.04.03 | 집합과 맵 | 절댓값 힙 | 2024.04.03 | +| 19차시 | 2024.04.07 | 조합론 | 인사성 밝은 곰곰이 | 2024.04.07 |