diff --git a/swea/1860.py b/swea/1860.py new file mode 100644 index 0000000..91eb727 --- /dev/null +++ b/swea/1860.py @@ -0,0 +1,35 @@ +from queue import Queue +t=int(input()) +for tc in range(1,t+1): + n,m,k=map(int,input().split()) + arr=list(map(int,input().split())) + q=Queue() + arr.sort() + for i in arr: + q.put(i) + + isPos=True + time=1 + cnt=0 + last=q.get() + while isPos and not(last0: + last=q.get() + else: + last=-1 + if cnt<0: + isPos=False + break + time+=1 + if last==0: + isPos=False + isPosStr="" + if isPos: + isPosStr="Possible" + else: + isPosStr="Impossible" + print("#"+str(tc),isPosStr)