Jump to content

nafiulislam

Members
  • Posts

    2
  • Joined

  • Last visited

nafiulislam's Achievements

Lepton

Lepton (1/13)

0

Reputation

  1. i am not perticipating only practicing. I want someone to tell me the planning so that i can solve it. i dont need code but steps to do it. plzz help me
  2. Here is a problem given below. I am badly in need of the solution of the problem: "Snake and ladder" is a game played in 10*10 board containing some cells number from 1 to 100.But 'Luffy(a boy)' doesn't like snake.So recently he has created a new version of the game with no snakes named 'Only ladder is real'.In this new game a player starts from the position 1 and the goal is to reach 100. In each move he can move forward up to 6 cells.But some cells contain a ladder.A ladder takes him up from one cell to another. If he reaches the bottom part of a ladder, he will immediately move to the cell which contains the upper part of the ladder. For example assume cell 5 contains a ladder which ends at cell 15. Then if palyer reaches at cell 5, he will jump to cell 15. And if there is another ladder at cell 15 which ends at cell 60. He will directly move to cell 60 from 5. Note that there is no ladder in cell 1 and cell can contain at most one bottom part and at most one top part of a ladder. Find the minimum number of moves in a given board. Input specification: The first line of the input contains number of test cases,T(T<=100). In each case the first line contains the number of ladders,L(L<=20).Then follows “ L” lines each of which describes a ladder AB, where A(2<=A<=99) is the bottom cell of the ladder and B(B>A) is the top cell of the ladder. Output spcification: For each case print the case number and the minimum number of moves to reach from cell 1 to 100. sample Inpu-outputt: INPUT: 3 1 6 50 3 60 40 50 80 60 70 3 2 50 50 80 80 100 OUTPUT: case 1:10 case 2:7 case 3:1 please tell me the planning to solve it in c or if u are interested to solve it, give your code... plzzzzz.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.