11205 - The broken pedometer
Moderator: Board moderators
11205 - The broken pedometer
I am getting WA in this problem.
Can anyone give me some critical test case.
Can anyone give me some critical test case.
You can use bitwise operations to solve it. My brute force code(with bitwise calculations) took 0.312 seconds.
Ami ekhono shopno dekhi...
HomePage
HomePage
In this prob u have to find minimum number of active led's necessary to identify each symbol's means no repetive pattern.
In the first sample used 7 led's to represent a symbol. But if we turn off led 5 && 6 then it is still have no repetive pattern. So we need 5 active led's && thus the minimum.
Hope it helps.
In the first sample used 7 led's to represent a symbol. But if we turn off led 5 && 6 then it is still have no repetive pattern. So we need 5 active led's && thus the minimum.
Hope it helps.
try this case
output
[/code]
Code: Select all
5
2
2
1 0
1 1
4
5
1 1 1 1
0 1 1 0
1 0 0 1
1 1 0 0
0 0 0 1
1
2
1
0
1
1
0
4
4
1 1 0 0
0 0 1 0
1 0 0 0
0 1 0 0
Code: Select all
1
3
1
1
2
Last edited by mmonish on Tue May 22, 2007 10:31 am, edited 1 time in total.
thank you for your test cases!
I really misunderstood the problem
I really misunderstood the problem

Last edited by sjn on Tue May 22, 2007 9:30 am, edited 1 time in total.
Thank you for your post, I should read the problem and your previous post carefully next timemmonish wrote:yes.
That's the exact reason.

Last edited by sjn on Tue May 22, 2007 12:30 pm, edited 1 time in total.
asd
i've tried all test cases,but i still got WA...can anyone give me another critical testcases ?
thanks..
thanks..
is it a valid input
Code: Select all
1
2
2
11
11
I think there is no cases like that.
Try this cases
Input
Output
Try this cases
Input
Code: Select all
3
3
1
1 0 1
5
2
1 1 1 1 1
1 1 1 1 0
3
8
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Code: Select all
1
1
3