You are not logged in. Please login at www.codechef.com to post your questions!

×

# cf 447 div2 Ralph And His Magic Field

 0 i have understood the formula for it but i am unable to understand that when k=-1 and n and m have different parity the answer will be -1 but for k=1 answer will not be -1 why? problem asked 20 Nov '17, 22:42 4★anno 266●2●11 accept rate: 12%

 0 if we multiply all rows's product then they should be equal to multiplication of all element in the matrix same for columns. if n and m have different parity lets say n is even and m is odd then when we multiply all row's product we get even number because each row's product is equal to -1 but when we multiply all column's product then we get odd number but both should be equal to multiplication of all elements in the matrix that's why for k=-1 if n and m have different parity then solution does not exist.... answered 24 Nov '17, 00:56 1 accept rate: 0%
 3 This comment shall answer your question. answered 20 Nov '17, 23:04 31●3 accept rate: 0%
 toggle preview community wiki:
Preview

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×890
×688
×2

question asked: 20 Nov '17, 22:42

question was seen: 513 times

last updated: 24 Nov '17, 00:56