<%@ Language=JavaScript %> Volume I
Make your own free website on Tripod.com

Home ] ACM Help ] [ Volume I ] Volume II ] Volume III ] Volume IV ] Volume V ] Volume VI ] Volume VII ] Volume VIII ] Volume C ] Volume CI ] Volume CII ] Volume CIII ] Volume CIV ] Volume CV ] Volume CVI ] Volume CVII ] Volume CVIII ]

I am also very beginner in this site. If you don't understand any word or site. Please just mail me.

This page was last updated on 08/25/05.

Solved and have hints:

100 101

Mail me: smibrahim@gmail.com

100 The 3n + 1 problem

This is a easy problem, just follow the algorithm and count the length of every cycle. After that just find out the max length. I think you will get the accept. Must be careful about the max and min condition. (as start  can be bigger then the end). so just use:

    if ( start > end )


        start =end;


Now it's i and  j limit is 1 million. Be careful!!!!!!!

101 The Blocks Problem                                  

 Problem  Critical Input    Output

Too much lengthy problem. But interesting.............

From the problem definition and also from the input & output, This problem can be solve using simple using stack. Here I use stack with structure.   


Others will be added soon..............