From a493536ad89c488dc35ce6494eb00732c737d997 Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Mon, 27 May 2024 16:37:17 +0900 Subject: [PATCH] add: swea/5789.py --- swea/5789.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 swea/5789.py diff --git a/swea/5789.py b/swea/5789.py new file mode 100644 index 0000000..ac001b6 --- /dev/null +++ b/swea/5789.py @@ -0,0 +1,15 @@ +t=int(input()) +for tc in range(1,t+1): + n,q=map(int,input().split()) + d={} + for i in range(1,n+1): + d[i]=0 + for i in range(q): + s,e=map(int,input().split()) + + for j in range(s,e+1): + d[j]=i+1 + rs="#"+str(tc)+" " + for i in range(1,n+1): + rs+=str(d[i])+" " + print(rs)