## 11044 - Searching for Nessy

Moderator: Board moderators

L I M O N
Learning poster
Posts: 58
Joined: Wed Dec 31, 2003 8:43 am
Contact:

### 11044 - Searching for Nessy

i just print (n/3) * (m/3) and got WA.
Is my algorithm right ??

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:
just print (n/3) * (m/3) and got WA.
Is my algorithm right ??
Yes, it's correct.

emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Contact:
TO LIMON

input

Code: Select all

``````1
5 5``````
output

Code: Select all

``4``

Code: Select all

``1``

Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:
I disagree - 1 is the right answer (one sonar in the middle is enough).

emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Contact:
Krzysztof Duleba
I agree with you,
My previous post was an example of stupid mistake
sorry

fcsc
New poster
Posts: 3
Joined: Wed Mar 01, 2006 4:33 pm
Yeah you are getting wrong answer because you have to cast in the div, is not the same (n/3) * (m/3) than ( (int) (n/3)) * ( (int) (m/3))

Good work
____________________________
"Free software for a free society"

Yes!
New poster
Posts: 1
Joined: Tue Nov 13, 2007 6:10 pm
Contact:

### Re: 11044 - Searching for Nessy

How (n/3) * (m/3) derieved? anyone pls help

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Contact:

### Re: 11044 - Searching for Nessy

Think rows and columns differently.
Ami ekhono shopno dekhi...
HomePage

plamplam
Experienced poster
Posts: 150
Joined: Fri May 06, 2011 11:37 am

### Re: 11044 - Searching for Nessy

@LIMON your algorithm is partially correct.
Consider the following cases:

Code: Select all

``````4
173 2936
8801 807
3403 7068
12 11
``````

Code: Select all

``````55746
788977
2671704
12
``````
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson

mpmohi
New poster
Posts: 13
Joined: Wed Feb 26, 2014 10:15 pm

### Re: 11044 - Searching for Nessy

I tested the given input-output and my code passed the test... but then I got WA!!
my code =>

Code: Select all

`````` Error was  for(i=0;i<=testCase;i++)  :D
``````
Now Where is my mistake ??
Last edited by mpmohi on Sat Nov 22, 2014 11:35 pm, edited 1 time in total.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 11044 - Searching for Nessy

Try running your code on the sample input.
Check input and AC output for thousands of problems on uDebug!

ssavi
New poster
Posts: 28
Joined: Thu Nov 20, 2014 9:57 pm

### Re: 11044 - Searching for Nessy

Jan wrote:Think rows and columns differently.
I don't get this . How it could be implented . can anyone please describe with an example ??
I know I am a Failure Guy .