From a37e8ccf01d93b306a8d3250fb7a26ba08002269 Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Fri, 17 May 2024 19:38:32 +0900 Subject: [PATCH] add: swea/6485.py --- swea/6485.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 swea/6485.py diff --git a/swea/6485.py b/swea/6485.py new file mode 100644 index 0000000..bc3a4ef --- /dev/null +++ b/swea/6485.py @@ -0,0 +1,23 @@ +t=int(input()) + +for tc in range(1,t+1): + n=int(input()) + bs={} + + for i in range(n): + s,e=map(int,input().split()) + for j in range(s,e+1): + if j in bs: + bs[j]+=1 + else: + bs[j]=1 + p=int(input()) + result=[] + for i in range(p): + po=int(input()) + + if po in bs: + result.append(bs[po]) + else: + result.append(0) + print("#"+str(tc),*result)