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,49 @@
|
||||
|
||||
/* ,*/
|
||||
#include <time.h>
|
||||
#include/* _ ,o*/ <stdlib.h>
|
||||
#define c(C)/* - . */return ( C); /* 2004*/
|
||||
#include <stdio.h>/*. Moekan "' `\b-' */
|
||||
typedef/* */char p;p* u ,w [9
|
||||
][128] ,*v;typedef int _;_ R,i,N,I,A ,m,o,e
|
||||
[9], a[256],k [9], n[ 256];FILE*f ;_ x (_ K,_ r
|
||||
,_ q){; for(; r< q ; K =((
|
||||
0xffffff) &(K>>8))^ n[255 & ( K
|
||||
^u[0 + r ++ ] )]);c (K
|
||||
)} _ E (p*r, p*q ){ c( f =
|
||||
fopen (r ,q))}_ B(_ q){c( fseek (f, 0
|
||||
,q))}_ D(){c( fclose(f ))}_ C( p *q){c( 0- puts(q ) )}_/* /
|
||||
*/main(_ t,p**z){if(t<4)c( C("<in" "file>" "\40<l" "a" "yout> "
|
||||
/*b9213272*/"<outfile>" ) )u=0;i=I=(E(z[1],"rb")) ?B(2)?0 : (((o =ftell
|
||||
(f))>=8)?(u =(p*)malloc(o))?B(0)?0:!fread(u,o,1,f):0:0)?0: D():0 ;if(
|
||||
!u)c(C(" bad\40input "));if(E(z[2],"rb" )){for(N=-1;256> i;n[i++] =-1 )a[
|
||||
i]=0; for(i=I=0; i<o&&(R =fgetc( f))>-1;i++)++a[R] ?(R==N)?( ++I>7)?(n[
|
||||
N]+1 )?0:(n [N ]=i-7):0: (N=R) |(I=1):0;A =-1;N=o+1;for(i=33;i<127;i++
|
||||
)( n[i ]+ 1&&N>a[i])? N= a [A=i] :0;B(i=I=0);if(A+1)for(N=n[A];
|
||||
I< 8&& (R =fgetc(f ))> -1&& i <o ;i++)(i<N||i>N+7)?(R==A)?((*w[I
|
||||
] =u [i])?1:(*w[I]= 46))?(a [I++]=i):0:0:0;D();}if(I<1)c(C(
|
||||
" bad\40la" "yout "))for(i =0;256>(R= i);n[i++]=R)for(A=8;
|
||||
A >0;A --) R = ( (R&1)==0) ?(unsigned int)R>>(01):((unsigned
|
||||
/*kero Q' ,KSS */)R>> 1)^ 0xedb88320;m=a[I-1];a[I
|
||||
]=(m <N)?(m= N+8): ++ m;for(i=00;i<I;e[i++]=0){
|
||||
v=w [i]+1;for(R =33;127 >R;R++)if(R-47&&R-92
|
||||
&& R-(_)* w[i])*( v++)= (p)R;*v=0;}for(sprintf
|
||||
/*'_ G*/ (*w+1, "%0" "8x",x(R=time(i=0),m,o)^~
|
||||
0) ;i< 8;++ i)u [N+ i]=*(*w+i+1);for(*k=x(~
|
||||
0,i=0 ,*a);i>- 1; ){for (A=i;A<I;A++){u[+a [ A]
|
||||
]=w[A ][e[A]] ; k [A+1]=x (k[A],a[A],a[A+1]
|
||||
);}if (R==k[I]) c( (E(z[3 ],"wb+"))?fwrite(
|
||||
/* */ u,o,1,f)?D ()|C(" \n OK."):0 :C(
|
||||
" \n WriteError" )) for (i =+I-
|
||||
1 ;i >-1?!w[i][++ e[+ i]]:0;
|
||||
) for( A=+i--; A<I;e[A++]
|
||||
=0); (i <I-4 )?putchar
|
||||
((_ ) 46) | fflush
|
||||
/*' ,*/ ( stdout
|
||||
): 0& 0;}c(C
|
||||
(" \n fail")
|
||||
) /* dP' /
|
||||
dP pd '
|
||||
' zc
|
||||
*/
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
Best Utility:
|
||||
|
||||
Don Yang
|
||||
259 E. Bellbrook St.
|
||||
Covina, CA 91722
|
||||
USA
|
||||
|
||||
http://uguu.org/
|
||||
|
||||
|
||||
Judges' Comments:
|
||||
|
||||
To build:
|
||||
|
||||
make omoikane
|
||||
|
||||
Try:
|
||||
|
||||
./omoikane omoikane.info omoikane.info omoikane.output
|
||||
|
||||
For extra credit, spot the checksum in the source file itself.
|
||||
What makes this one particularly interesting is that the checksum,
|
||||
strictly speaking, isn't being computed at all. Rather, the file
|
||||
is modified to have the desired checksum! This does, we suppose,
|
||||
solve the problem that inserting a checksum would change the file's
|
||||
checksum; if you have to change it, you might as well change it!
|
||||
|
||||
This program was submitted under the name "Rinia", so the Author's
|
||||
Comments refer to it as such.
|
||||
|
||||
|
||||
Selected Author's Comments:
|
||||
|
||||
Rinia (1/14/04)
|
||||
|
||||
Rinia is a tool for embedding CRCs in text files. No need to assign
|
||||
strange file names or package .SFVs with your files! Rinia will
|
||||
insert a human-readable checksum string in the text itself! ^_^
|
||||
|
||||
0. Usage `
|
||||
|
||||
rinia <infile> <layout> <outfile>
|
||||
|
||||
All three arguments may reference the same file. All files is
|
||||
assumed to be of ASCII character set.
|
||||
|
||||
1. Input %
|
||||
|
||||
Any file larger than 8 bytes is valid. Upper limit on file size is
|
||||
limited by memory.
|
||||
|
||||
If input file can't be loaded for any reason, Rinia will say "bad
|
||||
input" and exit immediately.
|
||||
|
||||
2. Layout _
|
||||
|
||||
The layout file contains a map of where Rinia can patch. The
|
||||
content consists of marker characters (where Rinia is allowed to
|
||||
change in the original text) and other characters (where the
|
||||
original text will stay as is). Rinia will select the marker
|
||||
character using these heuristics:
|
||||
|
||||
1. Ignore all space/control/extended characters.
|
||||
2. Select characters that appeared 8 times in a row.
|
||||
3. Of those selected characters, pick one with the lowest
|
||||
frequency.
|
||||
|
||||
One way to create the layout file is to make a copy of the original
|
||||
file, replace where you want Rinia to match with a rare character,
|
||||
then replace the remaining ones with space. Often it's possible to
|
||||
write the original file in such a way that it can be used as a
|
||||
layout.
|
||||
|
||||
Example file/layout:
|
||||
|
||||
file: layout:
|
||||
crc = ######## ... . XXXXXXXX
|
||||
patch = ###### ..... . XXXXXX
|
||||
other text here ..... .... ....
|
||||
|
||||
And Rinia may generate a file similar to this:
|
||||
|
||||
crc = 1bad73cf
|
||||
patch = #FR-QQ
|
||||
other text here
|
||||
|
||||
Note that the original file by itself is a valid layout file, since
|
||||
Rinia will recognize that only # marks enough space to hold the
|
||||
checksum, and has the lowest frequency.
|
||||
|
||||
If layout file can't be used for any reason, Rinia will say "bad
|
||||
layout" and exit immediately.
|
||||
|
||||
3. Output m
|
||||
|
||||
If Rinia finds a usuable checksum, she will say "OK." and write to
|
||||
the specified output file. Otherwise the exit message is "fail"
|
||||
and nothing is written.
|
||||
|
||||
Chances of success and how long it takes to run to completion is
|
||||
completely dominated by the layout file design. In general, Rinia
|
||||
runs faster if the checksum is placed before the other marker
|
||||
characters rather than after, e.g.:
|
||||
|
||||
a: X X XXX b: XXXXXXXX c: XXXXXXXX
|
||||
XXXXXXXX X X XXX XXXXX
|
||||
|
||||
"a" usually takes the longest time, while "c" usually is the
|
||||
fastest.
|
||||
|
||||
That said, each run is randomized with respect to system time, so
|
||||
it's not always certain whether Rinia will succeed in a short time
|
||||
or not. In general, 5 marker characters is sufficient, and takes
|
||||
a few minutes.
|
||||
|
||||
For reference, rinia.c was produced on a 1.7GHz machine (the
|
||||
checksum is at line 17). Out of 25 runs, the shortest was 2
|
||||
seconds while the longest took 5 minutes. Average was about a
|
||||
minute. Checksum for this file (b7a81524) took about 4 minutes.
|
||||
|
||||
4. Algorithm 3
|
||||
|
||||
Inserting a checksum in the file you are computing the checksum of
|
||||
isn't quite trivial, since changing the file content would change
|
||||
the final checksum value.
|
||||
|
||||
To insert the checksum, Rinia first assumes a random final
|
||||
checksum, insert that string, then modify other parts to compensate
|
||||
for the change in content.
|
||||
|
||||
The compensation bytes are very easy to compute for binary files
|
||||
with enough consecutive scratch areas, but for text files with
|
||||
non-consecutive areas and limited degrees of freedom, Rinia has to
|
||||
try out all character combinations. This is done in a hierarchical
|
||||
fashion, computing only smallest partial checksum after each
|
||||
change.
|
||||
|
||||
For computers few years ago, this is probably still too slow to be
|
||||
acceptible... but at the speed the IOCCC judges run the contest
|
||||
these days, I am sure you have enough patience for it ^_^;
|
||||
|
||||
5. Source code =
|
||||
|
||||
rinia.c should compile anywhere (but with a few warnings). I don't
|
||||
have a big-endian machine to test but Rinia should work there as
|
||||
well. ASCII character set required though.
|
||||
|
||||
Code is formatted to the shape of "Rinia" from the anime/game
|
||||
"Moekko Company". Of course at 90x50 it's hard to recognize anything
|
||||
^_^;
|
||||
|
||||
Rinia is the slow but hardworking android. On some jobs she does
|
||||
very well, on others she would spend lots of time and effort but
|
||||
still fail...
|
||||
|
||||
(text above is also included as an info file, so that the checksum
|
||||
would match)
|
||||
@@ -0,0 +1,121 @@
|
||||
Rinia (1/14/04)
|
||||
|
||||
Rinia is a tool for embedding CRCs in text files. No need to assign
|
||||
strange file names or package .SFVs with your files! Rinia will
|
||||
insert a human-readable checksum string in the text itself! ^_^
|
||||
|
||||
0. Usage `
|
||||
|
||||
rinia <infile> <layout> <outfile>
|
||||
|
||||
All three arguments may reference the same file. All files is
|
||||
assumed to be of ASCII character set.
|
||||
|
||||
1. Input %
|
||||
|
||||
Any file larger than 8 bytes is valid. Upper limit on file size is
|
||||
limited by memory.
|
||||
|
||||
If input file can't be loaded for any reason, Rinia will say "bad
|
||||
input" and exit immediately.
|
||||
|
||||
2. Layout _
|
||||
|
||||
The layout file contains a map of where Rinia can patch. The
|
||||
content consists of marker characters (where Rinia is allowed to
|
||||
change in the original text) and other characters (where the
|
||||
original text will stay as is). Rinia will select the marker
|
||||
character using these heuristics:
|
||||
|
||||
1. Ignore all space/control/extended characters.
|
||||
2. Select characters that appeared 8 times in a row.
|
||||
3. Of those selected characters, pick one with the lowest
|
||||
frequency.
|
||||
|
||||
One way to create the layout file is to make a copy of the original
|
||||
file, replace where you want Rinia to match with a rare character,
|
||||
then replace the remaining ones with space. Often it's possible to
|
||||
write the original file in such a way that it can be used as a
|
||||
layout.
|
||||
|
||||
Example file/layout:
|
||||
|
||||
file: layout:
|
||||
crc = ######## ... . XXXXXXXX
|
||||
patch = ###### ..... . XXXXXX
|
||||
other text here ..... .... ....
|
||||
|
||||
And Rinia may generate a file similar to this:
|
||||
|
||||
crc = 1bad73cf
|
||||
patch = #FR-QQ
|
||||
other text here
|
||||
|
||||
Note that the original file by itself is a valid layout file, since
|
||||
Rinia will recognize that only # marks enough space to hold the
|
||||
checksum, and has the lowest frequency.
|
||||
|
||||
If layout file can't be used for any reason, Rinia will say "bad
|
||||
layout" and exit immediately.
|
||||
|
||||
3. Output m
|
||||
|
||||
If Rinia finds a usuable checksum, she will say "OK." and write to
|
||||
the specified output file. Otherwise the exit message is "fail"
|
||||
and nothing is written.
|
||||
|
||||
Chances of success and how long it takes to run to completion is
|
||||
completely dominated by the layout file design. In general, Rinia
|
||||
runs faster if the checksum is placed before the other marker
|
||||
characters rather than after, e.g.:
|
||||
|
||||
a: X X XXX b: XXXXXXXX c: XXXXXXXX
|
||||
XXXXXXXX X X XXX XXXXX
|
||||
|
||||
"a" usually takes the longest time, while "c" usually is the
|
||||
fastest.
|
||||
|
||||
That said, each run is randomized with respect to system time, so
|
||||
it's not always certain whether Rinia will succeed in a short time
|
||||
or not. In general, 5 marker characters is sufficient, and takes
|
||||
a few minutes.
|
||||
|
||||
For reference, rinia.c was produced on a 1.7GHz machine (the
|
||||
checksum is at line 17). Out of 25 runs, the shortest was 2
|
||||
seconds while the longest took 5 minutes. Average was about a
|
||||
minute. Checksum for this file (b7a81524) took about 4 minutes.
|
||||
|
||||
4. Algorithm 3
|
||||
|
||||
Inserting a checksum in the file you are computing the checksum of
|
||||
isn't quite trivial, since changing the file content would change
|
||||
the final checksum value.
|
||||
|
||||
To insert the checksum, Rinia first assumes a random final
|
||||
checksum, insert that string, then modify other parts to compensate
|
||||
for the change in content.
|
||||
|
||||
The compensation bytes are very easy to compute for binary files
|
||||
with enough consecutive scratch areas, but for text files with
|
||||
non-consecutive areas and limited degrees of freedom, Rinia has to
|
||||
try out all character combinations. This is done in a hierarchical
|
||||
fashion, computing only smallest partial checksum after each
|
||||
change.
|
||||
|
||||
For computers few years ago, this is probably still too slow to be
|
||||
acceptible... but at the speed the IOCCC judges run the contest
|
||||
these days, I am sure you have enough patience for it ^_^;
|
||||
|
||||
5. Source code =
|
||||
|
||||
rinia.c should compile anywhere (but with a few warnings). I don't
|
||||
have a big-endian machine to test but Rinia should work there as
|
||||
well. ASCII character set required though.
|
||||
|
||||
Code is formatted to the shape of "Rinia" from the anime/game
|
||||
"Moekko Company". Of course at 90x50 it's hard to recognize anything
|
||||
^_^;
|
||||
|
||||
Rinia is the slow but hardworking android. On some jobs she does
|
||||
very well, on others she would spend lots of time and effort but
|
||||
still fail...
|
||||
Reference in new issue
Block a user