[algogeeks] Re: Programing problem

2007-10-07 Thread macharla pradeep
Hi, if ( commnad sequence is bad ) whether to include it area calculation or not?? On 10/5/07, piruk [EMAIL PROTECTED] wrote: Hi. How to solve this task? Areameter is a turtle-like self-propelled vehicle controlled by sequences of commands transmitted over a radio channel.

[algogeeks] Re: Programing problem

2007-10-07 Thread Ajinkya Kale
On 10/7/07, macharla pradeep [EMAIL PROTECTED] wrote: Hi, if ( commnad sequence is bad ) whether to include it area calculation or not?? It is mentioned that command sequence is never bad. On 10/5/07, piruk [EMAIL PROTECTED] wrote: Hi. How to solve this task?

[algogeeks] Re: Programing problem

2007-10-05 Thread adak
For each test case Do call function Read_it() /* read the next move */ call Count_it() /* count the # of squares walked through */ while (move length is 0) print area moved through for that case next That would be my starting pseudo-code.

[algogeeks] Re: Programing problem

2007-10-05 Thread Vishal
Find the enclosing rectangle for the area. Calculate minX, maxX, minY, maxY. Now find whether the enclosing area lies to left and right side of the path**. Note that the path is not self-intersecting. currX = startX; area = 0 if ( left ) // enclosing area to left of path { for each move {