cleanup winner README.md files

Fixed cases where there was a bad trailing backslash.

Improved a few cases where a code block was needed
to highlight some text.

Changed a few cases where a code block needed to
declared as, say, a sh code block.

Fixed a few cases where the winner information was not properly formatted.

Plus a few nits and clarifying text was added.
This commit is contained in:
Landon Curt Noll committed 2023-11-04 03:21:11 -07:00
1 parent 394f710bc3
commit 360708f858
120 files changed
+1198 -1024

No files matched your search

+58 -36
View File
@@ -28,7 +28,6 @@ NOTE: if you do not specify an arg to the program it will segfault.
## Judges' remarks:
\
Once you get past the obfuscation, you have an opportunity to learn
about regular expressions and state machines.
@@ -79,43 +78,49 @@ character list.
### Example 2: `^abc`
<q0> a <q1>
<q1> b <q2>
<q2> c [q3]
[q3] . [q3]
```
<q0> a <q1>
<q1> b <q2>
<q2> c [q3]
[q3] . [q3]
```
### Example 3: `abc$`
<q0> a <q1> . <q0>
<q1> b <q2> a <q1> . <q0>
<q2> c [q3] a <q1> . <q0>
[q3] . <q1>
```
<q0> a <q1> . <q0>
<q1> b <q2> a <q1> . <q0>
<q2> c [q3] a <q1> . <q0>
[q3] . <q1>
```
### Example 4: `^(abc)*$`
[q0] a <q1>
<q1> b <q2>
<q2> c [q0]
```
[q0] a <q1>
<q1> b <q2>
<q2> c [q0]
```
### Example 5: `^[ab][cd][ef]$`
<q0> ab <q1>
<q1> cd <q2>
<q2> ef [q3]
[q3]
```
<q0> ab <q1>
<q1> cd <q2>
<q2> ef [q3]
[q3]
```
### Example 6: `^(abc|efg)$`
<q0> a <q1> e <q3>
<q1> b <q2>
<q2> c [q5]
<q3> f <q4>
<q4> g [q5]
[q5]
```
<q0> a <q1> e <q3>
<q1> b <q2>
<q2> c [q5]
<q3> f <q4>
<q4> g [q5]
[q5]
```
With the automaton specification in 'filename', invoke the program by
@@ -149,8 +154,9 @@ as the specification for the automaton. (This file has been renamed\
to `adrian.c` by the judges.) In this case, the program will search for\
matches to the regular expression:
^.[^|C][^w[Q]*(Q|[w[]c).*|^.[C|]$
```
^.[^|C][^w[Q]*(Q|[w[]c).*|^.[C|]$
```
I suggest using `adgrep.c` as input, and storing the output in `adwc.c`:
@@ -166,7 +172,9 @@ displays the number of lines, words, and bytes in the input file.
Another possibly interesting automaton can be created by slightly
adjusting the `adgrep.c` file. Change the first line to read
/* . echo| . */
```c
/* . echo| . */
```
and repeat the process above
@@ -176,7 +184,9 @@ and repeat the process above
The new file now contains all lines which match
^.[^5|m^]*[m^]([e=p,;]|[^e=+p,;].*)$
```
^.[^5|m^]*[m^]([e=p,;]|[^e=+p,;].*)$
```
Compile and run. This is an echo clone. Note the efficient algorithm
employed.
@@ -185,11 +195,15 @@ employed.
Two other adjustments to the first line also yield useful results. By
changing it to
/* . head; . */
```c
/* . head; . */
```
you can search for matches to
^.[^W]*W..*$
```
^.[^W]*W..*$
```
By some freak happenstance, lines of adgrep.c which match this regular
expression form a unix head command. It prints the first ten lines of
@@ -198,12 +212,16 @@ specified).
By setting the first line to
/* . basename . */
```c
/* . basename . */
```
a clone of the unix basename command can be unearthed. The automaton will
search for
^.[^j]*jr.*$
```
^.[^j]*jr.*$
```
on standard input. And the program which results by running adgrep.c
through this filter requires two parameters. The first is meant to be a
@@ -213,11 +231,15 @@ The resulting base name is printed to stdout.
Lastly, by setting the first line to
/* . sleep . */
```c
/* . sleep . */
```
you can search for
^.[^(~][^s]*sl.*$
```
^.[^(~][^s]*sl.*$
```
Filtering adgrep.c through this search yields a clone of the sleep
command. Invoke with a single integer parameter, and it will pause
+1 -2
View File
@@ -3,7 +3,7 @@
Albert van der Horst\
S P&A R&C\
Oranjestraat 8\
3511 RA UTRECHT\
3511 RA UTRECHT\
The Netherlands
@@ -65,7 +65,6 @@ Use `albert.alt` as you would `albert` above.
## Judges' remarks:
\
We were impressed with the speed at which it was able to factor
arbitrarily large numbers consisting of factors that fit into
a long.
+4 -4
View File
@@ -182,21 +182,21 @@ programs is the conditional (given that we have loops).
Since all you can do in the given operation output set is
assignment, we implement "conditional assignment":
```
```c
if (x) y = z;
```
To implement this, we constrain x to be either 0 or 1, and
simply compute:
```
```c
y = (z * x) + (y * (1-x));
```
This is more obscured by factoring out common terms and restricting
ourselves to two operand operations:
```
```c
temp = z; (temp == z)
temp -= y; (temp == z-y)
temp *= x; (temp == (z-y)*x)
@@ -210,7 +210,7 @@ Next we imagine we have a [pc](https://en.wikipedia.org/wiki/Program_counter).
we're not currently coming up on statement pc. To handle this, we simply make
every operation conditional on the pc having the correct value:
```
```c
if (pc == some_constant) y = z;
```
-2
View File
@@ -236,12 +236,10 @@ those bits that should remain zero. For example, the following
program prints all those 16-bit integers that contain zeroes in all
even bit positions:
```c
main(){int i=0,s=0xAAAA;do{printf("%04x\t",i);}while(i=((i|~s)+1)&s);}
```
AG uses a similar method but works in the opposite direction, finding
the next lower value with zeroes in given bit positions by propagating
borrows across those bits. Some additional adjustments are made
+1 -1
View File
@@ -22,7 +22,7 @@ make all
# text mode
./imc -text
./imc\
./imc
```
+5 -5
View File
@@ -66,12 +66,12 @@ distribute winners outside of the US.
Nathan Sidwell stated that he was willing to distribute the winning source. To
read HIS instructions of how to obtain his winning program one was able to run:
```sh
make nathan
./nathan
```
make nathan
./nathan
to learn how to get a copy of the code.
to learn how to get a copy of the code.
See the 1992/nathan.c file in the
[../../archive/archive-1992.tar.bz2](archive/archive-1992.tar.bz2) tarball if
+2 -3
View File
@@ -19,7 +19,7 @@ make all
## To use:
```sh
./vern 3 # <-- default is 2
./vern 3 # <-- default is 2
```
@@ -31,7 +31,7 @@ You might start off by giving the following input:
63 43
76 55
71 52
67 57 # (this may take a while)
67 57 # <-- this may take a while
```
@@ -47,7 +47,6 @@ For a real quick game try:
65 55
66 46
```
NOTE: Move values must be restricted to the range 00 to 77.
+6 -4
View File
@@ -35,7 +35,7 @@ show correctly!
### Try:
```sh
./whereami 47 -122 (- means west of meridian)
./whereami 47 -122 # NOTE: - means west of meridian
./whereami 47 122
```
@@ -66,7 +66,7 @@ NOTE: this alternative version also needs a terminal that wraps at 80 columns.
To find the approximate place where this entry was judged, type:
```sh
./whereami 37 -122 (- means west of meridian)
./whereami 37 -122 # NOTE: - means west of meridian
```
@@ -155,8 +155,10 @@ n="bnaBCOCXdBBHGYdAP[A M E R I C A].AqandkmavX|ELC}BOCd"
The code will test the 80-column wrap and document itself if it is
joined together as one 160-character line and listed. You should see:
main(l,a,n,d)...
[A M E R I C A]...
```c
main(l,a,n,d)...
[A M E R I C A]...
```
...going down the left edge if your terminal auto-wraps at 80 characters.