From 660655083513afcfb8982cc276b0fdb98a678538 Mon Sep 17 00:00:00 2001 From: initcatcher Date: Mon, 28 Apr 2025 22:43:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[Baekjoon-3020]=20=EA=B0=9C=EB=98=A5?= =?UTF-8?q?=EB=B2=8C=EB=A0=88.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...34\353\230\245\353\262\214\353\240\210.py" | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 "\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-3020] \352\260\234\353\230\245\353\262\214\353\240\210.py" diff --git "a/\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-3020] \352\260\234\353\230\245\353\262\214\353\240\210.py" "b/\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-3020] \352\260\234\353\230\245\353\262\214\353\240\210.py" new file mode 100644 index 00000000..65177228 --- /dev/null +++ "b/\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-3020] \352\260\234\353\230\245\353\262\214\353\240\210.py" @@ -0,0 +1,33 @@ +from bisect import bisect_left +import sys +from collections import defaultdict + +input = sys.stdin.readline +N, H = map(int, input().split()) + +top = [] +bottom = [] + +for i in range(N): + if i%2==0: + bottom.append(int(input())) + else: + top.append(int(input())) + +bottom.sort() +top.sort() + + + +left,right = 1, H + +count = defaultdict(int) +min_ans = N +for i in range(1, H+1): + + b_cnt = len(bottom) - bisect_left(bottom,i) + t_cnt = len(top) - bisect_left(top, H-i+1) + total = b_cnt + t_cnt + min_ans = min(min_ans,total) + count[total] += 1 +print(min_ans, count[min_ans]) From 20a2af4f1a8c09e87a6467e3d922e0c80ec04e53 Mon Sep 17 00:00:00 2001 From: initcatcher Date: Mon, 28 Apr 2025 22:56:55 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[Bakjoon-18119]=20=EB=8B=A8=EC=96=B4=20?= =?UTF-8?q?=EC=95=94=EA=B8=B0.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\354\226\264 \354\225\224\352\270\260.py" | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 "\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-18119] \353\213\250\354\226\264 \354\225\224\352\270\260.py" diff --git "a/\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-18119] \353\213\250\354\226\264 \354\225\224\352\270\260.py" "b/\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-18119] \353\213\250\354\226\264 \354\225\224\352\270\260.py" new file mode 100644 index 00000000..aa1d94e1 --- /dev/null +++ "b/\355\227\210\353\257\274\352\266\214_15\354\243\274\354\260\250/[BOJ-18119] \353\213\250\354\226\264 \354\225\224\352\270\260.py" @@ -0,0 +1,32 @@ +import sys +from collections import defaultdict +input = sys.stdin.readline + + +N,M = map(int,input().split()) + +words = defaultdict(int) + +for _ in range(N): + s = set(input().strip()) + mask = 1<<26 + for i in range(26): + if chr(97+i) in s: + mask |= 1< Date: Mon, 28 Apr 2025 22:57:36 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[Baekjoon-18119]=20=EB=8B=A8=EC=96=B4=20?= =?UTF-8?q?=EC=95=94=EA=B8=B0.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit