-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8500499
commit bd6f38f
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Himansh loves billiards very much. One day while playing a match , he found out a new trick in the game. He interpreted each red balls as 0 and each white balls as 1 .He started taking a note of the positions of white and red balls in the table. If there are at least 6 balls of same color placed one after another, then the situation is considered dangerous else its out of danger. | ||
|
||
Input Description:- | ||
- First line of input consists of t, the number of test cases | ||
- Next t lines each consists of: | ||
String: string consisting of 0 and 1 | ||
|
||
Input variables: | ||
int t: No. of test cases | ||
String : string comprising of 0 and 1 | ||
|
||
Output Description: | ||
YES if the situation is dangerous | ||
NO if the situation is out of danger | ||
|
||
Constraints: | ||
1<=t<=4 | ||
0<=value of each character<=1 | ||
|
||
Sample Input: | ||
2 | ||
001001 | ||
1000000001 | ||
|
||
Sample Output: | ||
NO | ||
YES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
15 | ||
10010000011111110101001001001101010111011 | ||
1101110100111111001000 | ||
000001 | ||
1000110110000001001011000111110001010110 | ||
0111100010111010001000 | ||
1111111 | ||
110100000100101010101110010000101001011000011 | ||
1011101101011011001000110111 | ||
1101000000011011000001010110010001000011100 | ||
1001111001100011 | ||
01111010100 | ||
10010110100110110 | ||
001111011110111100100100101011111000110100010 | ||
0111010010110001101000011010110000001101101101 | ||
010011011110101110 |