Files
ioccc/2012/konno
Landon Curt Noll a9ca93ec47 fix markdown footnote problem caused by pandoc
Add "<!-- BEFORE: 1st line of markdown file: FILE/PATH -->"
before the markdown content.  This line appears in the
generated HTML.

Add "<!-- AFTER: last line of markdown file: FILE/PATH -->"
after the markdown content.  This line appears in the
generated HTML.

We test a fix relating to problems produced by `pandoc(1)`
when footnotes are added at the end of generated HTML.
This test is made for `2000/bmeyer/index.html`.

Fixed exit 4 in `bin/md2html.sh that should be exit 5.

Changed `bin/md2html.sh` VERSION from to "1.3 2024-04-14"
to "1.4 2024-04-18".

Run `bin/readme2index.sh -v 1 2000/bmeyer` to perform the above.
2024-04-19 01:20:31 -07:00
..
2020-12-30 16:57:03 -08:00
2023-07-06 21:49:38 -07:00
2024-02-23 08:52:56 -08:00

To build:

    make

There is an unobfuscated version of this entry. See Alternate code below.

To use:

    ./konno N

Try:

    ./try.sh

    # you can also specify numbers to try before the random and preselected ones:
    ./try.sh 111 222 333 444 555 666 777 888 999

Try running try.sh a number of times as the first part randomly selects ten numbers to try.

Alternate code:

An alternate version of this entry, konno.alt.c, is provided. This alternate code is an unobfuscated version of the winning code.

Alternate build:

    make alt

Alternate use:

Use konno.alt as you would konno above.

Judges' remarks:

This entry is a good one-liner to analyze completely.

For extra credit, what are the minimal changes to convert it to 64-bit integers so that it could print 32 lines?

Author's remarks:

Remarks

This program outputs elementary cellular automaton patterns.

Try:

    ./konno 30
    ./konno 90
    ./konno 102
    ./konno 109
    ./konno 165

There are 256 (from 0 through 255) possible rules.

Obfuscation

This program uses bit operations. I think

    7&O<<!o>>!o+29

is an interesting operation. This isn't equal to

    7&O>>29

operation. What is the operation doing?

Limitation

This program assumes that the size of int is 4.