Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

A helicopter drops two trains, each on a parachute, onto a
straight infinite railway line. There is an undefined
distance between the two trains. Each faces the same
direction, and upon landing, the parachute attached to each
train falls to the ground next to the train and detaches.
Each train has a microchip that controls its motion. The
chips are identical. There is no way for the trains to know
where they are. You need to write the code in the chip to
make the trains bump into each other. Each line of code
takes a single clock cycle to execute.

You can use the following commands (and only these);

MF - moves the train forward

MB - moves the train backward

IF (P) - conditional that's satisfied if the train is next
to a parachute. There is no "then" to this IF statement.

GOTO

Answer Posted / raghav

In answer #4 , I think there is no need of these 3 lines
MF
MF
MB
Instead we can use only 1 line
MF

Both produces the same result but 1 line command is more efficient i think.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How Can A Cake(circular) Be Cut Into 8 Pieces By Making Just 3 Cuts?

1083


If DBMDVUUB = CALCUTTA Then BOMBAY = ?

2133


There N stations on a railroad. After adding x stations 46 additional tickets have to be printed. Find N and X.

1131


PROCESS FLOW IN LOGISTICS

2050


Why we use Caffine in HPLC calibration?

2144


1. Profit and loss problem.. Two mercants sold a good of worth Rs 1000 from which one merchant A got profit from selling prices and merchant B got profit form cost price and profit for both is 25% what is difference amount.? 2.5lts solution bottles in which 4 lts of solution is filled in which 15 % of salt is mixed,1.5 lits solution is fell out and it is filled with water how much of salt content is present..? 3.Square of 21 cms and bull was tied at corner with rope of 7 cms how much area it can graze... 4.A and B can do a work 15 and 20 days respectively form which A as done half of the work and then b joind then it done 1/20th work how much many days in which a complted work which left by B.

1910


A cloth merchant claims to sell is material at cost price but uses a scale which reads 1 meter for every 95 centimeter. Find the gain percent?

2360


sqrt(0.16)+cubic root(0.027) equals

1115


A certain quantity of milk is found to be adulterated to the extent of 10%. What proportion of the adulterated milk should be replaced with pure milk to take the purity level to 98%?

1464


A boy has Rs 3 in total. If he wins, he gains 1 Rupee and if he looses, he has to loose 1 Rupee. The boy may lose only 5 times in the game and if he earns 5 Rs, he has to quit the game. Find the number of ways of the possibilities.

1211


a train covers the distance D between two cities in hours arriving 2 hours late.what rate would permit to train to arrive on schedule?

1380


Mary's father's brother is Andrews Andrews daughter's son is Sunil Brothers name is Sam Who is Sam to Sunil?

1613


A clock with the hours round the face in Roman block numbers, as illustrated in the sketch fell down and the dial broke into four parts....

2494


6 people A,B,C,D,E and F sit around a table for dinner. Since A does not like C, he doesn't sit either opposite or beside C.B and F always like to sit opposite each other. If A is beside F then who is are the two neighbours of B?

2229


From the below mentioned options choose the number that comes to 15 when divided by 4 and added by 9?

1347