Submit | All submissions | Best solutions | Back to list |
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
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 |
hide comments
2011-12-14 04:02:54 LeppyR64
Problem statement seems alright now. |
|
2011-12-13 02:44:32 m0ad
are the test case right? Edit by Omar ElAzazy: I changed the input specifications to match the input files, please check the problem statement again. How many lines for input? Edit by Omar ElAzazy: You should read till the end of the input Last edit: 2011-12-13 04:11:59 |