Page 1 of 2

### 11205 - The broken pedometer

Posted: Sun May 20, 2007 4:11 pm
I am getting WA in this problem.
Can anyone give me some critical test case.

Posted: Sun May 20, 2007 5:34 pm
Now i got AC. But my program takes 1.633 sec.
I checked all possible configaration.
Anyone please tell me how can i improve the time.

Posted: Sun May 20, 2007 5:47 pm
You can use bitwise operations to solve it. My brute force code(with bitwise calculations) took 0.312 seconds.

Posted: Mon May 21, 2007 4:05 am
sorry, I don't understand what this problem means.
In this case, LEDs 5 and 6 can be suppressed without losing information, so the solution is 5.
What does this mean??I looked this problem twice but still can't understand it

Posted: Mon May 21, 2007 4:37 am
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.

Posted: Mon May 21, 2007 5:55 am
I finally understand this problem!!

Now I am thinking how to solve it...

Posted: Mon May 21, 2007 11:14 am
Can anyone give some critical test cases?

Posted: Mon May 21, 2007 3:32 pm
try this case

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
``````
output

Code: Select all

``````1
3
1
1
2
``````
[/code]

Posted: Mon May 21, 2007 3:59 pm
thank you for your test cases!

I really misunderstood the problem

Posted: Mon May 21, 2007 4:33 pm
yes.
That's the exact reason.

Posted: Tue May 22, 2007 9:36 am
mmonish wrote:yes.
That's the exact reason.
Thank you for your post, I should read the problem and your previous post carefully next time

Posted: Tue May 22, 2007 10:32 am
Sily mistake in my typing. The result should be 1.

now i edit my post. Thanks for ur reply.

### asd

Posted: Wed May 23, 2007 4:42 pm
i've tried all test cases,but i still got WA...can anyone give me another critical testcases ?

thanks..

Posted: Wed May 23, 2007 6:21 pm
is it a valid input

Code: Select all

``````1
2
2
11
11``````

Posted: Wed May 23, 2007 6:57 pm
I think there is no cases like that.

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
``````
Output

Code: Select all

``````1
1
3``````