Giter Site home page Giter Site logo

find-path-cranes's Introduction

Find Path With Cranes

There are N cranes arranged in a line. The K-th crane is located at distance P[K] from the beggining of the road and its arm length is equal to A[K]. The cranes can't change their places. There is a package, initially located at position B, that has to be moved by the cranes to position E. The K-th crane can pick up the package only if the distance between its position and the package position is less than equal to A[K] (the package is within arm range from the crane's position). A package can be moved by a crane to an arbitrary position within the crane's arm reach (between P[K]-A[K] and P[K]+A[K] for the K-th crane). For example, if P[K]=5 and A[K]=3, the K-th crane can move packages anywhere between positions 2 and 8, including both of the boudries.



Determine whether it is possible to move the package from position B to position E using some (possibly all) of the cranes.

find-path-cranes's People

Contributors

monsiw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.