Page 1 of 1

11350 - Stern-Brocot Tree

Posted: Sun Nov 11, 2007 5:43 pm
by H_Hima
why wrong?

I'm surprised after see that in the contest.

I consider empty lines.

oh what is the meaning of this part in problem statement?
"Path is the string if maximum length of 90 characters consisting from characters L or R."

this is my code.

Code: Select all

ohhhhhh what a bad.
two problems were not accepted because of this silly bugs.
thanks.

Got acc...

Posted: Sun Nov 11, 2007 5:50 pm
by saman_saadi
I think you must use unsigned long long instead of int!

Code: Select all

struct rat
{
   unsigned long long a, b;
};

RE

Posted: Sun Nov 11, 2007 9:56 pm
by Hojjat jafary
I used only long long and it was sufficient.
you can do this problem with simple for loop.

Posted: Mon Nov 12, 2007 6:56 am
by shakil
H_Hima,
you must have to initialize again before all test cases. And also use
long long.

why the initializing

Posted: Mon Nov 12, 2007 8:54 am
by H_Hima
shakil wrote:H_Hima,
you must have to initialize again before all test cases.
hi shakil.
thanks for your attention.
but why initializing.
take a look at code.
the value of l , r, c were not change in the progress.

still thanks for your attention my friend.

please delete the code.
in this way the problem will spoil.

thanks again.

Re: 11350 - Stern-Brocot Tree

Posted: Thu Sep 17, 2009 10:06 pm
by StAnger
Could anyone help me with my code?
Am I missing something? Just can't figure out why it doesn't work...

Code: Select all

After using C++ style "cout" instead of C style "printf", the problem is solved.

Re: 11350 - Stern-Brocot Tree

Posted: Wed Aug 10, 2011 1:48 pm
by plamplam

Code: Select all

9
LRLRLRLRLR
LRLRLRLRLRLRLRLRLRLR
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLR
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR

Code: Select all

89/144
10946/17711
1346269/2178309
165580141/267914296
20365011074/32951280099
2504730781961/4052739537881
308061521170129/498454011879264
37889062373143906/61305790721611591
4660046610375530309/7540113804746346429