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


[closed] Cannot find mistake, please help

Can you please tell me where I made mistake?


I submitted it five times with minor modifications but got WA in all. I was able to solve rest of the problems without any problem. Please help with this one


asked 09 Aug '15, 22:32

dragonemperor's gravatar image

accept rate: 10%

closed 12 Aug '15, 13:21

The question has been closed for the following reason "The question is answered, right answer was accepted" by dragonemperor 12 Aug '15, 13:21

Brother when you are setting flag=1, then afterwards if any row with more no of 1s is present, the flag is not set to 0.

So inside if block add flag=0

It will work.


answered 10 Aug '15, 12:45

bradley's gravatar image

accept rate: 20%

edited 10 Aug '15, 15:04

See this solution, it is yours. I just added "flag=0;" and it got AC :)

Hope you can understand.


answered 10 Aug '15, 15:14

bradley's gravatar image

accept rate: 20%

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • 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:


question asked: 09 Aug '15, 22:32

question was seen: 681 times

last updated: 12 Aug '15, 13:21

Related questions