We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 685f891 commit 11deecfCopy full SHA for 11deecf
Techgig Code Gladiators 2021/open round/virus_outbreak.py
@@ -0,0 +1,29 @@
1
+
2
+def isSubsequence(V,B):
3
+ list_v = []
4
+ list_b = []
5
+ for c in V:
6
+ list_v.append(c)
7
8
+ for j in B:
9
+ list_b.append(j)
10
11
+ vindex = 0
12
+ bindex = 0
13
+ while vindex < len(list_v) and bindex < len(list_b):
14
+ if list_v[vindex] == list_b[bindex]:
15
+ bindex += 1
16
+ vindex += 1
17
18
+ if bindex == len(list_b):
19
+ return True
20
+ return False
21
22
+V = str(input())
23
+N = int(input())
24
+for i in range(N):
25
+ B = str(input())
26
+ result = isSubsequence(V,B)
27
+ if result == True:
28
+ print("POSITIVE")
29
+ else:
0 commit comments