As was discussed with Landon this was a mistake even if it helped with
consistency. There was even a brilliant pun that was destroyed with that
commit which I think is worth pointing out:

    cp README.md hill
    ./ant hill

in 1991/ant ... even if it's technically 'anthill'.

I hope that I got all links fixed in years.html and winners.html. As
well I tried to make sure I got all handles fixed in all/summary.txt.
Nevertheless these should be checked. For some handles they were never
updated (at least in the html files - though maybe summary.txt too, not
sure) in the first place so there was nothing to do.

Typo fixes like references to *.hint when it should be README.md. There
probably are others that need to be fixed but haven't been located yet.
This commit is contained in:
Cody Boone Ferguson committed 2023-03-17 08:27:55 -07:00
1 parent d4ef163cc4
commit 750255aded
52 files changed
+177 -164

No files matched your search

+116
View File
@@ -0,0 +1,116 @@
# Best of Show
Adrian Mariano
University of Washington
2729 72nd Ave SE
Mercer Island, WA 98040
USA
## To build:
make all
NOTE: thanks to Yusuke Endoh for the pointing out that `atof()` nowadays needs
`#include <stdlib.h>` in order to get this to work. Thanks also to Cody Boone
Ferguson for fixing some segfaults under modern (and in some cases earlier)
systems with this entry.
## To run:
./mariano expression x1 x2 h y1
where:
expression - function f(x,y) (see below)
x1 - start of interval
x2 - end of interval
h - step size
y1 - initial value (y(x1) == y1)
## Try:
./mariano y 0 1 0.1 1
## Judges' comments:
The program's source implements four functions, all from the
same source file!
When you compile mariano.c as is and run with 5 args, it numerically
solves the equation y'=f(x,y), with a step size of h, over the interval
x=[x1,x2], with the initial condition of y(x1)=y1.
The 'expression' f(x,y), is any function of 'x' and 'y' with the
operators:
+ - * / ^
The symbol '^' is the power operator. Note that it only supports
integer powers. Also note that all expressions are evaluated strictly
left to right. (i.e., parenthesis aren't supported).
Try running the program with the following args:
./mariano y 0 1 0.1 1
./mariano 1/x 1 2 0.1 0
./mariano 'x^2/y+x' 0 1 0.1 6
But wait, there is more! You also get, free of charge, a
reversing filter! Try:
./mariano -r 0 0 0 0 < mariano.c > sorter.c
Still not impressed? The author throws in for free, a
sort program! Try:
cc sorter.c -o sorter
ls | ./sorter
This program is safe for home use as well. The author has
included a safety feature in case you misplace the original
program source:
./sorter -r 0 0 0 0 < sorter.c > mariano_bkp.c
And finally, as a special offer to users of this entry,
the author provides a Fibonacci sequence generator! Try:
./sorter 0 0 0 0 < mariano.c > fibonacci.c
cc fibonacci.c -o fibonacci
./fibonacci 1 1
./fibonacci 2 1
Program available 9 track and cartridge cassette. Gensu knife
not included! :-)
When this program was first shown at the 1990 Summer Usenix
conference, it received a standing ovation; a first for
a contest entry.
Originally we noted that the 4 trailing args '0 0 0 0' were required on systems
that dump core when NULL is dereferenced but this problem showed itself in
modern systems even with the 4 '0 0 0 0'. To make this easier for users Cody
Boone Ferguson kindly fixed this problem.
## Author's comments
Differential equations are solved via the Runge-Kutta method,
which guarantees local error proportional to h^5, and total
error across a finite interval is at most a constant times h^4.
Sorting is accomplished with a standard shell sort.
Note that the sorting and reversing is limited to files with
fewer than 500 lines, each less than 99 characters long.
Copyright (c) 1990, Landon Curt Noll & Larry Bassel.
All Rights Reserved. Permission for personal, educational or non-profit use is
granted provided this this copyright and notice are included in its entirety
and remains unaltered. All other uses must receive prior permission in writing
from both Landon Curt Noll and Larry Bassel.