STRSPL - Theory of Computation
One day M and O were attedning a Theory of Computation lecture when Dr H asked: "What is the maximum number of consecutive 1s in the following binary string ?". Of course, that was an introduction to some turing machine related problem. Now M and O wonders how to solve that.
A binary string is a string formed only of 0s and 1s.
Input
A binary string split on several lines, concatenate all the lines to get the input which will be of a length N (1 <= N <= 100).
Output
The maximum number of consecutive 1s.
Example
Input: 11110
010
10111
11 Output: 5
hide comments
LeppyR64:
2011-12-14 04:02:54
Problem statement seems alright now. |
|
m0ad:
2011-12-13 02:44:32
are the test case right?
|
Added by: | Omar ElAzazy |
Date: | 2011-12-13 |
Time limit: | 2s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own Problem |