11000 - Bee

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

Psyco
New poster
Posts: 14
Joined: Sat Jan 21, 2006 12:39 pm
Contact:

11000 Why AC?

Post by Psyco »

My program is print N Fibonachi -1, N+1 Fibonachi -1.

Is it OK?

I am 0.000 and AC!

I'm confused...-_-;;;

check = 11321 :o :o

david
Learning poster
Posts: 83
Joined: Mon Apr 21, 2003 10:14 pm

Post by david »

Yes, it is correct.
Suppose there are f[n] - 1 male bees and f[n+1] - 1 bees in total. Then there are f[n - 1] female bees, and next year there will be 1 + f[n] - 1 = f[n] female bees and f[n-1] + f[n] - 1 = f[n + 1] - 1 male ones.

tmdrbs6584
Learning poster
Posts: 98
Joined: Sat Jan 21, 2006 12:45 pm
Location: Busan,Corea(Republic of)

11000 - Bee

Post by tmdrbs6584 »

n_st Fibonacci-1?
I'ts so easy to solve the problem!

shalinmangar
New poster
Posts: 6
Joined: Sun Nov 27, 2005 8:24 am
Location: India

Post by shalinmangar »

Is it really?

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo »

This problem is supposed to be trivial, we don't even need big int

shalinmangar
New poster
Posts: 6
Joined: Sun Nov 27, 2005 8:24 am
Location: India

Post by shalinmangar »

Yes, I got AC. I saw the problem after seeing this post so my thoughts were pretty biased. It was trivial.

tmdrbs6584
Learning poster
Posts: 98
Joined: Sat Jan 21, 2006 12:45 pm
Location: Busan,Corea(Republic of)

Post by tmdrbs6584 »

but you must use long long int!!

neno_uci
Experienced poster
Posts: 104
Joined: Sat Jan 17, 2004 12:26 pm
Location: Cuba

Post by neno_uci »

Actually I've got Accepted using unsigned int :wink:

abhiramn
New poster
Posts: 29
Joined: Sat May 26, 2007 7:54 pm

Can someone give me sample inputs please

Post by abhiramn »

What is wrong with my program???

Code: Select all

ACCEPTED!!!
Please please reply.!

dipaly
New poster
Posts: 20
Joined: Tue Sep 19, 2006 6:18 pm
Location: bangladesh
Contact:

wa in 11000

Post by dipaly »

its an easy prob ... but i got wa .....
i just calculate the ( n th fibonacci -1 ) , (n+1 th fibonacci - 1)

here is my function ...

Code: Select all

long long a=1,b=1, male=0,total=0;	  
		
		for(long long i=1 ; i<=n ; i++)
		{
			male = a+b-1;
			long long t =a;
			a = b; 
			b = b+t;
			total = a+b-1;
		}
is my fibonacci function correct ????

& whats the ans of input 0
i think its ans is 0 1
??? plz help :oops:
everything is so hard to me

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

Post by Jan »

Your assumption is correct as well as your code. May be there is a problem with your implementation (which is not posted here).

PS: Is there any problem with posting full code?
Ami ekhono shopno dekhi...
HomePage

dipaly
New poster
Posts: 20
Joined: Tue Sep 19, 2006 6:18 pm
Location: bangladesh
Contact:

:( still wa

Post by dipaly »

PS: Is there any problem with posting full code?
I don't know ..Here is my code


ac

sorry 4 posting my [/code]
Last edited by dipaly on Mon Sep 03, 2007 6:48 am, edited 1 time in total.
everything is so hard to me

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

Post by Jan »

That's quite strange. Use

Code: Select all

    if(n==0) 
         printf("0 1\n");
May be there is a problem with the conversion!
Ami ekhono shopno dekhi...
HomePage

dipaly
New poster
Posts: 20
Joined: Tue Sep 19, 2006 6:18 pm
Location: bangladesh
Contact:

Re: :( still wa

Post by dipaly »

thanks ac now !!!!!! im realy a stupid[/quote]
everything is so hard to me

scott1991
New poster
Posts: 28
Joined: Fri Dec 07, 2007 11:41 pm

Post by scott1991 »

can anyone see what's wrong with this?

Code: Select all

AC now. Thanks!!
Cheers. Scott
Last edited by scott1991 on Sat Dec 15, 2007 2:19 pm, edited 1 time in total.

Post Reply

Return to “Volume 110 (11000-11099)”