ROUND 1 CODING CHALLENGE

Name   : Odd

Summary: Take as input a single line of integers in base 10, output the
          odd numbers in the input line (in base 10) in order, and terminate.

Par    : 284 (note: took me ~4 hours to find this not-fully optimized solution)

Details: For this starting exercise, input will assume to be sanitized to be:
          - A single line of text, followed by a newline (10).
          - Only consist of numeric characters [0-9], with a single space
            between each integer.
          - Contain at least 1 integer.
          - The first character will be a digit.  The last character
            immediately before the newline will be a digit.
          - Should work for arbitrary length of input, though with size
            of array and runtime limits, only up to 80 characters will
            be expected to run.
          Output will:
          - produce 1 line consisting of the odd numbers from the input
            separated by spaces, terminated by a newline, and exit.
          - Output must be produced/triggered by the newline, not an EOF.

Sample run:
$ bf odd.b
codesize: 284
12 45 834 9127 3
45 9127 3 
Run for 25355 steps.

**************************************************************************

Brainfuck Golf - full Contest Regulations.

1.  All persons start the game with 0 points.  The winner of the contest
      is the first person to earn 200 points as described here.  All
      first-class persons except the Contestmaster CAN earn points in this
      Contest; 'person' hereafter refers to first-class persons only.

2.  All solutions must be written in Brainfuck (BF). BF will be
      implemented in general as described here:
         http://esolangs.org/w/index.php?title=Brainfuck&oldid=32694
      The Contestmaster will use the following code to evaluate programs:
         http://pastebin.com/YKaRdgvb
      The comments at the beginning of this code describe implementation-
      specific issues for this contest.  The contestmaster CAN change the
      code used for evaluation With Notice, by publishing a link to the
      new code; e is encouraged to do so only in the case of bugs or
      implementation issues.

3.  The Contestmaster starts a round by announcing a coding challenge
      (the problem), and a program length (measured in BF characters) for
      eir implementation of a working program (Par).  The Contestmaster
      should not over-optimize eir solution.  A Working program is a BF
      program solves the problem for the (possible unannounced) test cases
      of the problem developed by the Contestmaster.  The length is the
      number of BF characters (excluding whitespace or comments) in the
      program.

4.  For the purpose of this contest, "Immediately" means within 4 days.

5.  All code submissions are made privately to the Contestmaster.  Upon
      receipt, the Contestmaster SHALL immediately privately inform the
      submitter of success/failure, and is encouraged to make helpful
      suggestions.

6.  The first person to submit a working solution of any length (the
      Leader) receives 10 points, plus 1 point for each character eir
      solution is under par (if it is under par).  The receipt of this
      entry begins the shootout period.  The Contestmaster shall
      immediately announce the receipt and length of the solution (the
      lead-establishing entry).  The shootout period ends 7 days after
      this announcement.

7.  The Target for the shootout period is Par or the length of the
      Leader's Submission, whichever is less.

8.  When the shootout period ends:
      a.  A person's Final Shot is the single, shortest-length WORKING
          program that e submitted during the Shootout period.  The
          lead-establishing entry is also considered to be a final shot,
          unless the leader submits a shorter working solution during
          the shootout period.
      b.  The single person (if any) who submits the shortest final shot
          earns 20 points.
      c.  Any person who submits a final shot earns 5 points, plus, if the
          shot is less than the target, 1 point for each character that
          the shot is less than the target.  The lead-establishing
          entry, if it also the leader's final shot, is not considered for
          this particular points award.
      d.  At the contestmaster's option, e MAY award 10 points to the most
          'elegant' solution, for which both coding and comments may be
          taken into consideration (although ASCII art in and of itself
          is discouraged, commenting and structural flair may count).
      e.  For the purpose of determining the "first" person to earn 200
          points, the points are awarded in the following order:  Points
          for (b. shortest shot) are awarded first, followed by points
          for (c. each person's final shot, awarded in the order each
          final shot was submitted) and finally (d. elegance).

9.  The Contestmaster SHALL announce awards for a Round, and publish all
      working solutions and scores, immediately after the shootout period
      ends, thus ending the Round.  Immediately after ending a round, if
      no person has won the contest, the Contestmaster SHALL start a new
      round.

10. The Contesmaster is the primary interpreter of the Regulations of
      this contest, and eir interpretations should only be overturned by
      the courts if they are arbitrarily or capriciously out of keeping
      with the spirit of this contest.





Reply via email to