Re: Problem related to marix
Hi.
I downloaded, compiled and ran your code with your input. Appart from the interface being a bit cryptic, it ran fine, and gave the expected output.
I'm using CodeBlocks MinGW on a Win32 machine.
I looked through your code, and saw nothing wrong.
I didn't get any warnings either, and I had -WAll
Apart from that, I don't know what to say, you don't say much other than "it doesn't work"... What is your problem? Compile? Crashes? Wrong result?
I suppose your algorithm is some kind of Gaussian elimination algorithm? This is fine because the algorithm is simple and deterministic, but it fails to respect the "The total number of button presses must be minimized" condition (I believe).
Re: Problem related to marix
Hii,
Thanks so much for ur response.
To get u a detailed scenario,let me tell you its giving me a WRONG ANSWER.
Regarding the last point which you mentioned about minimizing the no of button presses,i have developed the algo such that from the various possible solutions,it selects the solution which would take least no of button presses.So i dont really think that there may be a problem wrt the minimizing of button presses.
Awaitin reply asap!!thanks so much!!
Re: Problem related to marix
Quote:
Originally Posted by
ishandoshi
Hii,
Thanks so much for ur response.
To get u a detailed scenario,let me tell you its giving me a WRONG ANSWER.
Have you used your compiler's debugger? If not, now is the time to learn to use it since debugging your own applications is part and parcel of learning how to program.
Regards,
Paul McKenzie