STRCOUNT - Counting binary strings
Let f(n, k) is the number of length n binary strings for which the length of the longest substring of ones is equal to k. You have to build a table of these values.
Input
None.
Output
63 lines - the n-th of them consists of n+1 values: f(n, 0) f(n, 1) ... f(n, n).
Example
1 1 1 2 1 1 4 2 1 1 7 5 2 1 ...
hide comments
Sidharth Gupta:
2011-10-20 11:09:07
@Noszály Csaba: I am getting WA repeatedly. I have cross checked each value for n=1 to n=16 from brute force code and for higher values i have checked whether they sum up to power of 2 or not. can't figure out why WA.. can you help me out? submission id: 5870244.
|
|
sharad:
2011-10-19 01:48:27
dont use double long long is enough Last edit: 2011-10-20 11:02:13 |
|
Paused || :
2012-08-28 17:07:50
blashyrkh is absolutely right ! |
|
RAJDEEP GUPTA:
2011-09-23 06:33:40
@Noszály Csaba: I am getting WA. Can you kindly check why I am getting WA??
|
|
blashyrkh:
2011-09-21 21:05:32
You are not asked to get ONE f(n, m).
|
|
xiaodao:
2011-09-21 20:11:06
... How to get one f(n, m) quickly ?.. ) |
Added by: | czylabsonasa |
Date: | 2011-09-20 |
Time limit: | 0.102s |
Source limit: | 3333B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | folklore |