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. There are NN people standing on a line, exactly one of them (we don’t know who) is infected with a virus. The virus spreads from one person to another if their distance is at most 2. If the infected person is chosen optimally, find the minimum (bes

There are NN people standing on a line, exactly one of them (we don’t know who) is infected with a virus. The virus spreads from one person to another if their distance is at most 2. If the infected person is chosen optimally, find the minimum (bes

Scheduled Pinned Locked Moved C / C++ / MFC
4 Posts 4 Posters 4 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.
  • 0 Offline
    0 Offline
    099_Rohan
    wrote on last edited by
    #1

    Solve this soon.

    V J D 3 Replies Last reply
    0
    • 0 099_Rohan

      Solve this soon.

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Is it your homework?

      1 Reply Last reply
      0
      • 0 099_Rohan

        Solve this soon.

        J Offline
        J Offline
        jeron1
        wrote on last edited by
        #3

        No.

        "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

        1 Reply Last reply
        0
        • 0 099_Rohan

          Solve this soon.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          First, the assignment is incomplete as you tried to post the entire thing in the subject line instead of the body of the post. Second, no, we're not here to do your work for you. Asking for such is insulting. If you've got questions about your your own code, fine, we can help with that, but you have to ask the questions with proper detail to answer them.

          Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
          Dave Kreskowiak

          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