Move 1988-2004 entries into subdirs
We we move 1988-2004 entries from all of a year's winning entries in a single directory to each winner being in their own sub-directory under the given year directory.
This commit is contained in:
1 parent
1e82e8aa3e
commit
d2a42f42e8
478 files changed
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#define n ((e[++a]-42)/9-f[d+1])?
|
||||
#define o printf("%c",c[" 01./:;|\\"]);
|
||||
|
||||
char e[]="**3<HRZcir+3@OXakt;=GOXds*\?HRZcir*7HNZ`i19JS\\p*H[m1:CJSz*>H[`mr25\
|
||||
\?Hx,P,B2Gs-KTfzRdv1SeyCR-ISeu.<Ev+9+P,z,4PfzIdvO2*HRZcir6GPis=MU*3HRZcir*HZi\
|
||||
1JS\\epy*>H[m1JSey*DH[m*3<HZiu-@P*3HZi<N]q1JS\\epy:[m1CJSeny06I[m*4\?HRZcir,\
|
||||
\?*6HRZcir1J]q2K*H[m2K*H[m2@K]qtO@M2DK]q,]q1JS\\epy[m1:JSey+[m*3<HRZcir13Gt,\
|
||||
=GVs*3<HRZcir1J]qz*HF*AH2;DK]qua0=G2:K]q]q1CJS\\pDVu1:JS*D!+3:BIOSY`egilqtxz\
|
||||
\177.0249<==>EJMUY`ejov#$59@CJOXYZbfhlnrxy&+.57=@IMR[``bcfmnq!#),@",*f;
|
||||
|
||||
int main(int j,char *k[]) {
|
||||
int a,b,c,d,g,h,i=19;
|
||||
|
||||
printf(" ");
|
||||
for(g=0[f=(char *)calloc(80+(h=atoi(1[k])),1)]=1; g<=h; g++) {
|
||||
if ((g>30)&&(f[i-2]+f[i-1]!=0)) i++;
|
||||
for(d=c=0; d<i; d++) {
|
||||
o f[d]=(e[b=c*9,b+=(c=d[f]),(((a=e[345+b]+b/19*85-33-b/40*12-b/80*4)[e]
|
||||
-42)/9-f[d+1])?n n n n n n n n 0:a:a:a:a:a:a:a:a:a]-42)%9; }
|
||||
o if (0[f]-1) printf("\n%6i ",g); else printf("\n "); }
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
Best primal ASCII graphics:
|
||||
|
||||
Nicolas Ollinger
|
||||
Ecole Normale Superieure de Lyon
|
||||
LIP, ENS Lyon
|
||||
46, allée d'Italie
|
||||
69364 Lyon Cedex 07
|
||||
France
|
||||
|
||||
http://www.ens-lyon.fr/~nollinge/
|
||||
|
||||
|
||||
Judges' Comments:
|
||||
|
||||
To build:
|
||||
|
||||
make ollinger
|
||||
|
||||
Try:
|
||||
|
||||
In a large window, say 200 chars wide and 100 high (200x100)
|
||||
with a tiny font, try:
|
||||
|
||||
./ollinger 1000 | cut -c -200
|
||||
|
||||
|
||||
Do get lost in the programs line of thought! :-)
|
||||
|
||||
|
||||
Selected Author's Comments:
|
||||
|
||||
What's this?
|
||||
------------
|
||||
|
||||
What do you see? On the left, you will see an enumeration of all successive
|
||||
primes from 2 to the parameter you gave to the program. On the right part,
|
||||
you can see the sieve used to find these primes. The big diagonals from
|
||||
right to left are used to erase composed numbers. When no diagonal crosses
|
||||
a number, then the left cell take value 1 and the number is prime.
|
||||
|
||||
The parallel version of this algorithm works in real time n. This C
|
||||
sequential version is slower as it works in O(n*log n). But you have some
|
||||
nice picture instead... the cost is a constant number of operation for each
|
||||
character printed on the screen.
|
||||
|
||||
|
||||
Why do you wrote it?
|
||||
--------------------
|
||||
|
||||
Let's just quote the FAQ :
|
||||
|
||||
Q: Are there types of entries that are submitted so frequently that the
|
||||
judges get tired of them?
|
||||
|
||||
A: Yes, there are types of entries that show up over and over again.
|
||||
The guidelines say:
|
||||
|
||||
We tend to dislike programs that:
|
||||
are similar to previous winners
|
||||
|
||||
We like variety. However too often we see (please look at the winning
|
||||
examples given to be aware of the level of the competition):
|
||||
|
||||
(snip)
|
||||
|
||||
generating small primes (below is the list of all
|
||||
prime related winners)
|
||||
1985/august
|
||||
1988/applin
|
||||
1994/weisberg
|
||||
1995/makarios
|
||||
1996/dalbec
|
||||
2000/bellard
|
||||
|
||||
As you can see, just a list of primes (let alone small primes)
|
||||
does not cut it anymore.
|
||||
|
||||
(snip)
|
||||
|
||||
entries that use some complex state machine/table to print
|
||||
something
|
||||
|
||||
1988/isaak
|
||||
1988/phillipps
|
||||
|
||||
Unbeaten for 12 years and counting...
|
||||
|
||||
I think this is enough motivation for trying to submit a program which uses
|
||||
some complex state machine/table to generate small primes and print them.
|
||||
|
||||
|
||||
The way it works
|
||||
----------------
|
||||
|
||||
This program simply prints the space-time diagram of some particular
|
||||
cellular automaton. The automaton is a 9-state automaton by Korec in 1998.
|
||||
It is an optimization of an old automaton for recognizing primes designed
|
||||
by Fischer in 1965.
|
||||
|
||||
The table of the automaton is encoded into the string e and consists of
|
||||
345 transitions of the kind f(left,middle,right). This encoding into e
|
||||
is obfuscated to reduce its size, restrict it to characters 32 to 127 and
|
||||
guarantee a constant time.
|
||||
|
||||
The main loop simply iterates this transition function on each cell.
|
||||
|
||||
"The rest is silence" (Hamlet, V.2)
|
||||
|
||||
Enjoy!
|
||||
Reference in new issue
Block a user