11464 - Even Parity

All about problems in Volume 114. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

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

11464 - Even Parity

Post by sapnil » Tue Jul 22, 2008 8:51 pm

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

Post by mmonish » 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..

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

Re: 11464 WR

Post by sapnil » 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
"Dream Is The Key To Success"

@@@ Jony @@@

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

Re: 11464 - Even Parity

Post by andmej » Fri Jul 25, 2008 3:55 am

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

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

Re: 11464 - Even Parity

Post by sohel » 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?

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

Re: 11464 - Even Parity

Post by spflee » 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.

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

Re: 11464 - Even Parity

Post by dnr2 » 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… ).

Post Reply

Return to “Volume 114 (11400-11499)”