## 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?

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

david
Learning poster
Posts: 83
Joined: Mon Apr 21, 2003 10:14 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.

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

### 11000 - Bee

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
Is it really?

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:
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
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)
but you must use long long int!!

neno_uci
Experienced poster
Posts: 104
Joined: Sat Jan 17, 2004 12:26 pm
Location: Cuba
Actually I've got Accepted using unsigned int

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

### Can someone give me sample inputs please

What is wrong with my program???

Code: Select all

``````ACCEPTED!!!
``````

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

### wa in 11000

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
everything is so hard to me

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Contact:
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
Contact:

### :( still wa

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

### Re: :( still wa

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
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.