## 11464 - Even Parity

Moderator: Board moderators

sapnil
Experienced poster
Posts: 106
Joined: Thu Apr 26, 2007 2:40 pm
Location: CSE-SUST
Contact:

### 11464 - Even Parity

I'm getting WR.plz help me

Code: Select all

``````..........remove
``````
Thanks
Sapnil
Last edited by sapnil on Thu Jul 24, 2008 6:40 am, edited 1 time in total.
"Dream Is The Key To Success"

@@@ Jony @@@

mmonish
Experienced poster
Posts: 109
Joined: Sun Mar 11, 2007 2:55 pm
Location: SUST

### Re: 11464 WR

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..

sapnil
Experienced poster
Posts: 106
Joined: Thu Apr 26, 2007 2:40 pm
Location: CSE-SUST
Contact:

### Re: 11464 WR

sapnil wrote:I'm getting WR.plz help me

Code: Select all

``````Code remove
Thanks monish bhi

``````
Thanks
Sapnil
"Dream Is The Key To Success"

@@@ Jony @@@

andmej
Experienced poster
Posts: 158
Joined: Sun Feb 04, 2007 7:45 pm
Location: Medellin, Colombia

### Re: 11464 - Even Parity

Is this problem solved by brute-force?
Runtime errors in Pascal are reported as Wrong Answers by the online judge. Be careful.

Are you dreaming right now?
http://www.dreamviews.com

sohel
Guru
Posts: 856
Joined: Thu Jan 30, 2003 5:50 am
Location: New York

### Re: 11464 - Even Parity

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?

spflee
New poster
Posts: 1
Joined: Sat Aug 08, 2009 8:32 pm

### Re: 11464 - Even Parity

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.

dnr2
New poster
Posts: 2
Joined: Tue Oct 23, 2012 3:55 pm

### Re: 11464 - Even Parity

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… ).