Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Algorithm Problem

Algorithm Problem

Scheduled Pinned Locked Moved C / C++ / MFC
cssadobealgorithmshelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nirvikprantor
    wrote on last edited by
    #1

    Airport is divided to many Runways. Each runway has a mixed fixed delay amount of
    time to keep a plane on runway. If airplane delay time > runway delay time than airplane
    needs to take out from a runway, then it is considered as missed and starts from again
    from a runway. You need to find out the minimum total delay for particular input. First
    input line is number of runways. Second input line is delay of each runway.
    Third input line is capacity of each runway to accommodate planes. Forth input line is
    total number of planes. Fifth input line is maximum delay an airplane can afford. If it
    exceed the runway delay time it is miss and it needs to start from again from a runway.
    You need to show how you managed the runways as output as well.
    Examples:(All are from user input)
    5
    2 2 3 5 7
    2 2 2 2 2
    8
    1 1 1 1 2 2 3 3
    Answer= 3

    calculetion:(For another Example)
    2 2 3 5 7 (runways delay times)
    ____________
    1 1 1 5 3 (Air planes Delay times are less or equal
    1 2 2 0 0 than runways delay)
    __________
    1sec -0 0 0 4 2
    1sec -0 1 1 3 1
    1sec -0 0 0 2 0
    1sec -0 0 0 1 0
    1sec -0 0 0 0 0
    ________________
    Dealay Time=(1+1+1+1+1)sec
    =5 second
    Answer=5

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups