11044 - Searching for Nessy

All about problems in Volume 110. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

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

11044 - Searching for Nessy

Post by L I M O N »

i just print (n/3) * (m/3) and got WA.
Is my algorithm right ??
if Wrong, then anyone please help me to give some ideas.
mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

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
Location: Bangladesh
Contact:

Post by emotional blind »

TO LIMON

input

Code: Select all

1
5 5
output

Code: Select all

4
your output

Code: Select all

1
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post by Krzysztof Duleba »

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
Location: Bangladesh
Contact:

Post by emotional blind »

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

Post by fcsc »

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
Location: Bangladesh
Contact:

Re: 11044 - Searching for Nessy

Post by Yes! »

How (n/3) * (m/3) derieved? anyone pls help
Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Re: 11044 - Searching for Nessy

Post by Jan »

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

Post by plamplam »

@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

Post by mpmohi »

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

Post by brianfry713 »

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

Post by ssavi »

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 . :(
Post Reply

Return to “Volume 110 (11000-11099)”