Page 1 of 1

### 11464 - Even Parity

Posted: Tue Jul 22, 2008 8:51 pm
I'm getting WR.plz help me

Code: Select all

``````..........remove
``````
Thanks
Sapnil

### Re: 11464 WR

Posted: Wed Jul 23, 2008 7:35 pm
try this cases...
Input:

Code: Select all

``````2
2
1 0
0 1
2
0 1
1 1``````
Output:

Code: Select all

``````Case 1: 0
Case 2: 1``````
Hope this helps..

### Re: 11464 WR

Posted: Thu Jul 24, 2008 6:30 am
sapnil wrote:I'm getting WR.plz help me

Code: Select all

``````Code remove
Thanks monish bhi

``````
Thanks
Sapnil

### Re: 11464 - Even Parity

Posted: Fri Jul 25, 2008 3:55 am
Is this problem solved by brute-force?

### Re: 11464 - Even Parity

Posted: Sat Jul 26, 2008 12:28 pm
andmej wrote:Is this problem solved by brute-force?
That depends on the definition of your 'brute-force'.
What are you trying to brute-force on?

### Re: 11464 - Even Parity

Posted: Sat Aug 08, 2009 8:54 pm
Hm,I had tried this question,but my algorithm is too slow,I get time limit exceed ><.
I use brute force,which mean I test every case of 0 and 1 for the transformation of 0.
For instance, if there is three 0, then I will have 2^3 = 8 test case.
e.g
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

But if there is more than twenty 0, then I will have 2^20 = 1048576 test case.
Any other faster and better algorithm?Thanks.

### Re: 11464 - Even Parity

Posted: Tue Oct 23, 2012 4:10 pm
You can reduce the brute force to test all zeros only in the first row, all remaining cells will be automatically determined ( try to think why… ).