11044 - Searching for Nessy

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

Moderator: Board moderators

11044 - Searching for Nessy

Postby L I M O N » Tue Jun 13, 2006 6:32 am

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.
L I M O N
Learning poster
 
Posts: 58
Joined: Wed Dec 31, 2003 8:43 am
Location: Dhaka, Bangladesh

Postby mf » Tue Jun 13, 2006 8:30 am

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

Postby emotional blind » Tue Jun 13, 2006 4:30 pm

TO LIMON

input
Code: Select all
1
5 5


output
Code: Select all
4


your output
Code: Select all
1
User avatar
emotional blind
A great helper
 
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Location: Bangladesh

Postby Krzysztof Duleba » Tue Jun 13, 2006 5:04 pm

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

Postby emotional blind » Tue Jun 13, 2006 8:06 pm

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

Postby fcsc » Sun Aug 06, 2006 5:09 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"
fcsc
New poster
 
Posts: 3
Joined: Wed Mar 01, 2006 4:33 pm

Re: 11044 - Searching for Nessy

Postby Yes! » Fri Mar 27, 2009 9:46 pm

How (n/3) * (m/3) derieved? anyone pls help
Yes!
New poster
 
Posts: 1
Joined: Tue Nov 13, 2007 6:10 pm
Location: Bangladesh

Re: 11044 - Searching for Nessy

Postby Jan » Mon Mar 30, 2009 7:43 pm

Think rows and columns differently.
Ami ekhono shopno dekhi...
HomePage
Jan
Guru
 
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh

Re: 11044 - Searching for Nessy

Postby plamplam » Thu Jun 30, 2011 12:08 pm

@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
User avatar
plamplam
Experienced poster
 
Posts: 151
Joined: Fri May 06, 2011 11:37 am


Return to Volume CX

Who is online

Users browsing this forum: No registered users and 0 guests