Skip to content

Commit 750a3fc

Browse files
Update virus_outbreak.md
1 parent 6152ea5 commit 750a3fc

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

Techgig Code Gladiators 2021/open round/virus_outbreak.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,41 @@ The person in question is POSITIVE as B is the subsequence of the V.
1616
The scientists are busy with their research for medicine and request you to build a program which can quickly figure out if the person is POSITIVE or NEGATIVE. They will provide you with the virus composition V and all the people’s current blood composition. Can you help them?
1717

1818
<mark><b>Note</b>: The virus and blood compositions are lowercase alphabet strings.</mark>
19+
20+
#### Input Format:
21+
22+
The first line of the input consists of the virus composition, V
23+
24+
The second line of he input consists of the number of people, N
25+
26+
Next N lines each consist of the blood composition of the ith person, Bi
27+
28+
#### Constraints:
29+
30+
1<= N <=10
31+
32+
1<= |B|<= |V|<= 10^5
33+
34+
#### Output Format:
35+
36+
For each person, print POSITIVE or NEGATIVE in a separate line
37+
38+
Sample Test Case 1:
39+
40+
Input
41+
42+
```
43+
coronavirus
44+
3
45+
abcde
46+
crnas
47+
onarous
48+
```
49+
50+
Output
51+
52+
```
53+
NEGATIVE
54+
POSITIVE
55+
NEGATIVE
56+
```

0 commit comments

Comments
 (0)