×

# WA on Matrix Again[Closed]

 0 Here is my code: http://www.codechef.com/viewsolution/5636159 getting wrong answer,tried almost all test cases. Can't figure out the mistake! I bet its something very minute. :( asked 22 Dec '14, 20:50 291●2●3●19 accept rate: 10%

 0 Simplify the column sum to: sum += (a[j][i] + 10000007) % 10000007;  and simplify the column-sum product to: product = (product * sum) % 10000007;  answered 22 Dec '14, 20:55 362●1●3●15 accept rate: 31% still getting WA somehow..I don't think that should make a big difference. Both the statements mean the same things I guess? (22 Dec '14, 21:36)
 0 Hey bro Your code gives WA for this test case: http://ideone.com/HQaKb9 I run this test case on an AC'ed and got this output : 5601080 . You may check the line by line output from AC'ed code here: http://ideone.com/gJ9uy7 answered 22 Dec '14, 21:46 1.9k●1●12●42 accept rate: 14% Two things! 1) I got AC,I wrote the loops in the reverse order :P 2) That AC code gives WA for the input you provided. The correct answer is 7901228. Here is my AC solution : http://www.codechef.com/viewsolution/5636413 here one of the top AC solutions : http://ideone.com/TT0Ay6 both give the same answer :) I don't know how that solution got AC with wrong answer on that test case!! (22 Dec '14, 21:53) okay sorry for that, i didn't knew about that it AC code is giving WA.. SOrry... :( (22 Dec '14, 22:09)
 toggle preview community wiki:
Preview

By Email:

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:

×1,056
×102
×12

question asked: 22 Dec '14, 20:50

question was seen: 873 times

last updated: 22 Dec '14, 22:09