11350 - Stern-Brocot Tree

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

Moderator: Board moderators

Post Reply
H_Hima
New poster
Posts: 18
Joined: Mon Sep 25, 2006 10:56 am
Location: Solar System
Contact:

11350 - Stern-Brocot Tree

Post by H_Hima » Sun Nov 11, 2007 5:43 pm

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...
Last edited by H_Hima on Mon Nov 12, 2007 8:56 am, edited 1 time in total.

User avatar
saman_saadi
New poster
Posts: 31
Joined: Sun Feb 25, 2007 6:33 pm
Location: Tehran

Post by saman_saadi » Sun Nov 11, 2007 5:50 pm

I think you must use unsigned long long instead of int!

Code: Select all

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

Hojjat jafary
New poster
Posts: 10
Joined: Sun Sep 16, 2007 9:35 am

RE

Post by Hojjat jafary » Sun Nov 11, 2007 9:56 pm

I used only long long and it was sufficient.
you can do this problem with simple for loop.

shakil
Learning poster
Posts: 74
Joined: Sat Jul 15, 2006 6:28 am
Location: CUET , bangladesh
Contact:

Post by shakil » Mon Nov 12, 2007 6:56 am

H_Hima,
you must have to initialize again before all test cases. And also use
long long.
Last edited by shakil on Mon Nov 12, 2007 9:16 am, edited 1 time in total.
SHAKIL

H_Hima
New poster
Posts: 18
Joined: Mon Sep 25, 2006 10:56 am
Location: Solar System
Contact:

why the initializing

Post by H_Hima » Mon Nov 12, 2007 8:54 am

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.

StAnger
New poster
Posts: 3
Joined: Tue Sep 08, 2009 11:15 pm

Re: 11350 - Stern-Brocot Tree

Post by StAnger » Thu Sep 17, 2009 10:06 pm

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.

User avatar
plamplam
Experienced poster
Posts: 150
Joined: Fri May 06, 2011 11:37 am

Re: 11350 - Stern-Brocot Tree

Post by plamplam » Wed Aug 10, 2011 1:48 pm

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
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson

Post Reply

Return to “Volume 113 (11300-11399)”