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

×

[closed] Cannot find mistake, please help

Can you please tell me where I made mistake?

code

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

Problem

asked 09 Aug '15, 22:32

dragonemperor's gravatar image

3★dragonemperor
89321135
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.

link

answered 10 Aug '15, 12:45

bradley's gravatar image

3★bradley
6562321
accept rate: 20%

edited 10 Aug '15, 15:04

https://www.codechef.com/viewsolution/7718345

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

Hope you can understand.

link

answered 10 Aug '15, 15:14

bradley's gravatar image

3★bradley
6562321
accept rate: 20%

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×2

question asked: 09 Aug '15, 22:32

question was seen: 681 times

last updated: 12 Aug '15, 13:21

Related questions