fix .gitignore, Makefile and README.md for 2012/konno

Rename alt source file.
This commit is contained in:
Landon Curt Noll committed 2023-03-23 23:01:52 -07:00
1 parent 470a192219
commit 7d30702cbc
4 files changed
+46 -32

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
konno
konno_deobfuscate
konno.alt
+8 -9
View File
@@ -104,8 +104,8 @@ CINCLUDE=
#CINCLUDE= -include stdlib.h
#CINCLUDE= -include stdio.h
#CINCLUDE= -include stdlib.h -include stdio.h
#CINCLUDE= -I ${X11_INCDIR}
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
#CINCLUDE= -I ${X11_INCDIR} -I ${X11_INCDIR}/X11
#CINCLUDE= `${SDL2_CONFIG} --cflags`
# Optimization
#
@@ -129,7 +129,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
LIBS=
#LIBS= -lm
#LIBS= -L ${X11_LIBDIR} -lX11
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL2
#LIBS= `${SDL2_CONFIG} --libs`
# C compiler to use
#
@@ -170,8 +170,8 @@ OBJ= ${PROG}.o
DATA=
TARGET= ${PROG}
#
ALT_OBJ= ${PROG}_deobfuscate.o
ALT_TARGET= ${PROG}_deobfuscate
ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ${PROG}.alt
#################
@@ -188,14 +188,14 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${PROG}_deobfuscate: ${PROG}_deobfuscate.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable
#
alt: data ${ALT_TARGET}
@${TRUE}
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# data files
#
data: ${DATA}
@@ -330,4 +330,3 @@ pluto: charon
@echo "dwarf is a type of planet"
@echo "therefore, $@ is a planet"
@echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them"
+37 -22
View File
@@ -1,33 +1,43 @@
# Best one liner
Taketo Konno
Tokyo, Japan
<inaniwa3@gmail.com>
Taketo Konno
Tokyo, Japan
<inaniwa3@gmail.com>
## To build:
# To build:
make all
```sh
make
```
### To run:
./konno N
# where N is 0 to 255
```sh
./konno N
```
NOTE: N is an integer from 0 to 255.
### Try:
./konno 30
```sh
./konno 30
```
### Alternate code
An alternate version of this entry, konno_deobfuscate.c, is provided. This alternate code is an unobfuscated version of the winning code.
An alternate version of this entry, `konno_alt.c`, is provided.
This alternate code is an unobfuscated version of the winning code.
To compile this alternate version:
make alt
```sh
make alt
```
Use `konno_deobfuscate` as you would `konno` above.
Use `konno.alt` as you would `konno` above.
### Selected Judges Remarks:
## Judges' comments:
This entry is a good one-liner to analyze completely.
@@ -42,11 +52,13 @@ This program outputs [elementary cellular automaton](http://mathworld.wolfram.co
Try:
./konno 30
./konno 90
./konno 102
./konno 109
./konno 165
```sh
./konno 30
./konno 90
./konno 102
./konno 109
./konno 165
```
There are 256 (from 0 to 255) possible rules.
@@ -54,11 +66,15 @@ There are 256 (from 0 to 255) possible rules.
This program uses bit operations. I think
7&O<<!o>>!o+29
```c
7&O<<!o>>!o+29
```
is an intersting operation. This isn't equal to
7&O>>29
```c
7&O>>29
```
operation. What is the operation doing?
@@ -66,11 +82,10 @@ operation. What is the operation doing?
This program assumes that the size of int is 4.
--------------------------------------------------------------------------------
<!--
## Copyright:
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
[judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
-->
File renamed without changes.