Merge pull request #1727 from xexyl/hines87-make-alt
This commit is contained in:
8 files changed
+8
-141
No files matched your search
+4
-7
@@ -38,7 +38,8 @@ include ../../var.mk
|
||||
|
||||
# Common C compiler warnings to silence
|
||||
#
|
||||
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-deprecated-non-prototype
|
||||
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-deprecated-non-prototype \
|
||||
-Wno-implicit-int
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
@@ -111,8 +112,8 @@ OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
|
||||
|
||||
#################
|
||||
@@ -135,10 +136,6 @@ ${PROG}: ${PROG}.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
@echo "NOTE: The original source might not compile using modern compilers."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
+2
-10
@@ -114,8 +114,8 @@ OBJ= ${PROG}.o ${PROG}2.o
|
||||
DATA=
|
||||
TARGET= ${PROG} ${PROG}2
|
||||
#
|
||||
ALT_OBJ= ${PROG}.alt.o ${PROG}2.alt.o
|
||||
ALT_TARGET= ${PROG}.alt ${PROG}2.alt
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
|
||||
|
||||
#################
|
||||
@@ -141,14 +141,6 @@ ${PROG}2: ${PROG}2.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
@echo "NOTE: The original source might not compile using modern compilers."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
${PROG}2.alt: ${PROG}2.alt.c
|
||||
@echo "NOTE: The original source might not compile using modern compilers."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
make all
|
||||
```
|
||||
|
||||
There is [Alternate code](#alternate-code) available for if you have an old
|
||||
enough compiler.
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
@@ -26,17 +23,6 @@ To see what it would have looked like without the size restrictions:
|
||||
```
|
||||
|
||||
|
||||
## Alternate code:
|
||||
|
||||
If you have an old enough compiler you might wish to try using it. To use:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
```
|
||||
|
||||
Use `./lievaart.alt` as you would `./lievaart` above.
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
We believe that you too will be amazed at just how much power Mr. Lievaart
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#define D define
|
||||
#D Y return
|
||||
#D R for
|
||||
#D e while
|
||||
#D I printf
|
||||
#D l int
|
||||
#D C y=v+111;H(x,v)*y++= *x
|
||||
#D H(a,b)R(a=b+11;a<b+89;a++)
|
||||
#D s(a)t=scanf("%d",&a)
|
||||
l V[1100],u,r[]={-1,-11,-10,-9,1,11,10,9},h[]={11,18,81,88},ih[]={22,27,72,77},
|
||||
bz,lv=60,*x,*y,m,t;S(d,v,f,a,b)l*v;{l c=0,*n=v+100,bw=d<u-1?a:-9000,w,z,i,zb,q=
|
||||
3-f;if(d>u){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50
|
||||
:t==q?50:0;return w;}H(z,0){if(GZ(v,z,f,100)){c++;w= -S(d+1,n,q,-b,-bw);if(w>bw
|
||||
){zb=z;bw=w;if(w>=b||w>=8003)Y w;}}}if(!c){bz=0;C;Y-S(d+1,n,q,-b,-bw);}bz=zb;Y
|
||||
d>=u-1?bw+(c<<3):bw;}main(){R(;t<1100;t+=100)R(m=0;m<100;m++)V[t+m]=m<11||m>88
|
||||
||(m+1)%10<2?3:0;V[44]=V[55]=1;V[45]=V[54]=2;I("Level:");s(u);e(lv>0){do{I("Yo\
|
||||
u:");s(m);}e(!GZ(V,m,2,0)&&m!=99);if(m!=99)lv--;if(lv<15&&u<10)u+=2;I("Wait\n")
|
||||
;I("Value:%d\n",S(0,V,1,-9000,9000));I("move: %d\n",(lv-=GZ(V,bz,1,0),bz));}}GZ
|
||||
(v,z,f,o)l*v;{l*j,q=3-f,g=0,i,h,*k=v+z;if(*k==0)R(i=7;i>=0;i--){j=k+(h=r[i]);e(
|
||||
*j==q)j+=h;if(*j==f&&j-h!=k){if(!g){g=1;C;}e(j!=k)*((j-=h)+o)=f;}}Y g;}
|
||||
@@ -1,25 +0,0 @@
|
||||
#define D define
|
||||
#D Y return
|
||||
#D R for
|
||||
#D e while
|
||||
#D I printf
|
||||
#D l int
|
||||
#D W if
|
||||
#D C y=v+111;H(x,v)*y++= *x
|
||||
#D H(a,b)R(a=b+11;a<b+89;a++)
|
||||
#D s(a)t=scanf("%d",&a)
|
||||
#D U Z I
|
||||
#D Z I("123\
|
||||
45678\n");H(x,V){putchar(".XO"[*x]);W((x-V)%10==8){x+=2;I("%d\n",(x-V)/10-1);}}
|
||||
l V[1600],u,r[]={-1,-11,-10,-9,1,11,10,9},h[]={11,18,81,88},ih[]={22,27,72,77},
|
||||
bz,lv=60,*x,*y,m,t;S(d,v,f,_,a,b)l*v;{l c=0,*n=v+100,j=d<u-1?a:-9000,w,z,i,g,q=
|
||||
3-f;W(d>u){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50:
|
||||
t==q?50:0;Y w;}H(z,0){W(E(v,z,f,100)){c++;w= -S(d+1,n,q,0,-b,-j);W(w>j){g=bz=z;
|
||||
j=w;W(w>=b||w>=8003)Y w;}}}W(!c){g=0;W(_){H(x,v)c+= *x==f?1:*x==3-f?-1:0;Y c>0?
|
||||
8000+c:c-8000;}C;j= -S(d+1,n,q,1,-b,-j);}bz=g;Y d>=u-1?j+(c<<3):j;}main(){R(;t<
|
||||
1600;t+=100)R(m=0;m<100;m++)V[t+m]=m<11||m>88||(m+1)%10<2?3:0;I("Level:");V[44]
|
||||
=V[55]=1;V[45]=V[54]=2;s(u);e(lv>0){Z do{I("You:");s(m);}e(!E(V,m,2,0)&&m!=99);
|
||||
W(m!=99)lv--;W(lv<15&&u<10)u+=2;U("Wait\n");I("Value:%d\n",S(0,V,1,0,-9000,9000
|
||||
));I("move: %d\n",(lv-=E(V,bz,1,0),bz));}}E(v,z,f,o)l*v;{l*j,q=3-f,g=0,i,w,*k=v
|
||||
+z;W(*k==0)R(i=7;i>=0;i--){j=k+(w=r[i]);e(*j==q)j+=w;W(*j==f&&j-w!=k){W(!g){g=1
|
||||
;C;}e(j!=k)*((j-=w)+o)=f;}}Y g;}
|
||||
@@ -114,8 +114,8 @@ OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
|
||||
|
||||
#################
|
||||
@@ -138,9 +138,6 @@ ${PROG}: ${PROG}.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
@@ -12,18 +12,6 @@ make all
|
||||
```
|
||||
|
||||
|
||||
## Alternate code:
|
||||
|
||||
If you have an older compiler you can try compiling the original source code
|
||||
which is true symmetry:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
```
|
||||
|
||||
Use `westley.alt` as you would `westley` above.
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
`putchar()` must exist in the C library and not just as a macro.
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
char rahc
|
||||
[ ]
|
||||
=
|
||||
"\n/"
|
||||
,
|
||||
redivider
|
||||
[ ]
|
||||
=
|
||||
"Able was I ere I saw elbA"
|
||||
,
|
||||
*
|
||||
deliver,reviled
|
||||
=
|
||||
1+1
|
||||
,
|
||||
niam ; main
|
||||
( )
|
||||
{/*\}
|
||||
\*/
|
||||
int tni
|
||||
=
|
||||
0x0
|
||||
,
|
||||
rahctup,putchar
|
||||
( )
|
||||
,LACEDx0 = 0xDECAL,
|
||||
rof ; for
|
||||
(;(int) (tni);)
|
||||
(int) (tni)
|
||||
= reviled ; deliver =
|
||||
redivider
|
||||
;
|
||||
for ((int)(tni)++,++reviled;reviled* *deliver;deliver++,++(int)(tni)) rof
|
||||
=
|
||||
(int) -1- (tni)
|
||||
;reviled--;--deliver;
|
||||
(tni) = (int)
|
||||
- 0xDECAL + LACEDx0 -
|
||||
rof ; for
|
||||
(reviled--,(int)--(tni);(int) (tni);(int)--(tni),--deliver)
|
||||
rahctup = putchar
|
||||
(reviled* *deliver)
|
||||
;
|
||||
rahctup * putchar
|
||||
((char) * (rahc))
|
||||
;
|
||||
/*\
|
||||
{\*/}
|
||||
Reference in new issue
Block a user