Peg Test - March 9
Question 4
Given a grid of X's and O's, output whether or not there is a row of 4 X's in a row, either vertically, horizontally, or diagonally.
Input
T, representing how many cases there are to follow.
Then, T 4x4 grids of X's and O's
There will be a blank line in between each new grid.
Output
Yes, if there is a row of 4 X's in a row. No, otherwise.
Sample Input
2
XXXX
OOOO
OOOO
OOOO
XOOX
OXXX
XXOO
OXOX
Sample Output
Yes
No
All Submissions
Best Solutions
Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Mar 08, 2011
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
And for this question, just use sc.next(), works the same
Plz could anyone help, it would be greatly appreciated. THX.