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 » Thu Mar 09, 2006 2:24 pm

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 » Thu Mar 09, 2006 2:38 pm

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.

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

11000 - Bee

Post by tmdrbs6584 » Sun Mar 12, 2006 11:15 am

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 » Tue Mar 14, 2006 9:45 pm

Is it really?

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

Post by sclo » Tue Mar 14, 2006 11:13 pm

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 » Wed Mar 15, 2006 12:25 pm

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

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

Post by tmdrbs6584 » Sun Mar 19, 2006 2:23 am

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 » Sat Mar 25, 2006 5:24 pm

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 » Sat Jul 14, 2007 11:54 am

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 » Sun Aug 26, 2007 7:56 am

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 » Tue Aug 28, 2007 2:03 pm

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 » Sun Sep 02, 2007 12:42 pm

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 » Sun Sep 02, 2007 7:24 pm

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 » Mon Sep 03, 2007 6:47 am

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 » Fri Dec 14, 2007 8:08 pm

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)”