Main
  About Cybernetics
  Olympiad Regulations
  Olympiad History
 
  • Photo
  • Video



  •   Examples of Tasks
      Organizing Committee
      Current Olympiad
     
  • Teams Registration
  • Participants
  • Olympiad Results

  • Login:

    Password:

     
     RUS / ENG
        News
     
    Task 2009-1. “Woe from Wit”


    On the island in the middle of an ocean there is a village without mirrors where very smart green-eyed and dark blue-eyed natives lives. There is a rule in the village that if somebody of the villagers understands which color his eyes are he should leave the village at the midnight of the same day “for the better life search”. From the old days it was strictly prohibited to tell the others what color their eyes are. Nobody left the village for long time, but one day a stranger wandered in and exclaimed at ones at the whole village: “There are dark blue-eyed people among you! It is a rarity!” The stranger was driven away for the custom violation but it was too late. In several days the village got empty.

    Task. Define in how many days the village will get empty if there live N green-eyed and K dark blue-eyed natives.

    Streams. Input stream contains one nonnegative integer N and one positive integer K. Output stream should contain one positive integer.

    Example
    Input stream:
    0 1
    Output stream:
    1

     
       
    19.02.2013 17:19
     
    Cyber XIV. Results of Distance Session of Olympiad . . . -->

    21.01.2013 15:59
     
    Key for a training session . . . -->

    29.02.2012 12:41
     
    Video of the Olympiad . . . -->

    29.02.2012 12:12
     
    The results of Main Session of Olympiad on Cybernetics . . . -->

    News archive
     
    Back to news archive -->


    Today visitings: 379
    All visitings: 830015
    Web ststistics: