-
Notifications
You must be signed in to change notification settings - Fork 0
/
final_versions
86 lines (73 loc) · 4.58 KB
/
final_versions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
--------------------------- Java Version -------------------------------------
public class SlimBanner {
public static void main(String[]a) throws Exception {
int d[]={0xf,0xc000fb6, 0xc183f,0xc60dbff3,
0xe6dff8fb, 0x6ccc0db6, 0x667edb33, 0x0},
w=100,h=40, dw=25,dh =10,l=0,i,
j,p,zc=500; String f= "22-METsaysTHANKS!", b,z="";//
boolean/**/ v=true; while(zc-->0)z+="\n"; for(b=z;;
System.out.print(b), Thread. sleep(2000), v=!v,b=z)
for(i=0; i<h;i++ ,b+='\n' )for (j=0;j<w;j++){p
=i*dh/h *dw+j* dw/(w+1 );b += (((d[p/32]//
&(1L<<(31 -(p%32) )))>0) ^v) ?' ':f.
charAt/**/ (l++);l %=f./* **/ length();
}/*Profess orrrrrr Doctor<><><> Slim*A*/
}
}
----------------------------- C Version ---------------------------------------
#define w 100
#define h 40
#ifdef _WIN32
#include <windows.h>
#define sleep(n) Sleep(n*1000)
#endif
void main(){ int dw
=25,dh=10,l=0 ,i,j,p
,v=0,zc= 500,d[]
={0xf, /**/ 0xc000fb6,0xc183f,
/*\|/*/ /**/ 0xc60dbff3,0xe6dff8fb,
/*/|\*/ /**/ 0x6ccc0db6,0x667edb33,
0x0};char f[]= "22-M" "ETsaysTHANKS!"//:D?//
,z[500+(/**/ w+1) *h],* b=z+500;while(zc--)z
[zc]='\n'; for( ;;/**/ write(1,z,(w+1)*h),//
v=!v,sleep(2)) for( i=0;i <h;i ++) for(j
=0;j<w;j++,b [i*( w+1)+ j ]= '\n' ){p//
=i*dh/h* dw+j *dw/ (w+1 );b [i///
*(w+1)+j ]=(( (d[p /32] &(1L <<//4
(sizeof(int)*8 -(p% 32)-1 )))> 0)^v )//42
?' ':f[l++];l %= sizeof (f)- 1;}} //_\\
------------------------------ Prolog Version ------------------------------------
f("22-METsaysTHANKS!").
set(N,X):-X1 is X>>N, 1 is X1 /\1. d(MW ,MW,H,/**/ MH,WR,HR, B,X,F,V,
['\n'|R]):-!,H1 is H+ 1,d(0, MW,H1,MH ,WR,HR,B, X,F,V,R ). d(R,S,
LL,LL,I,M,A,B,D, E,[] ):- !. d(W,MW,H, MH,WR,HR ,B,X,[ F|Fs],V,
[C|R]):-P is B-(H*HR //MH * WR+W*WR// MW) ,W1 is W+1,(%%
set(P,X)->V1 =1;V1=0),(V1 xor V=:=1 ->C=F,d( W1,MW,%
H,MH,WR,HR,B ,X,Fs,V,R);C=' ',d(W1, MW,H,MH,WR, HR,B,X,
[F|Fs],V,R)) . r(0,_, []):-! . r(N,A, [A|Fs]) :-N1 is
N-1,r(N1,A, Fs). s_( W,H, DW, DH,V,X) :-f(A), length(
A,L),N is W *H//L+1 ,r(500 , '\n',Z1), flatten( Z1,Z),
r(N, A, F1), flatten( F1,F), B is DW*DH-1 ,d(0,W,0,H,
DW,DH,B,X,F, V,R),/* */writef( "%s%s\n",[Z ,R]),/*42*/ sleep(2),
(V =1->V1=0; V1=1),s_( W,H,DW,DH,/*For*The** *[Patience]*/ V1,X).
slimbanner:- s_(100,40,25,10,0,0x40000003c30003ed8003060ff1836ffcf9b7fe3edb33036d999fb6ccc000000).
-------------------------------- Haskell Quine ------------------------------------
import Data.Bits
d=[1809251421040881223578526132356212744386171840748677712684849289234581815296,
1809251420450559521827699622364399252817399751885605202647537205873328783360,
1809251400671549502771212599041018465181633543326290321054940158599106658304]
::[Integer];f="22-METsaysTHANKS!";o n x="\nc"++show n++"="++show x;a w h dw
dh=zipWith(t w h dw dh)[(x,y)|y<-[0..h-1],x<-[0..w]]$cycle f;t w h dw dh(x,y)c
|x==w='\n'|testBit(d!!0)(dw*dh-1-x*dw`div`(w+1)-y*dh`div`h*dw)=c|otherwise=' ';
main=putStrLn$((\x->"{-"++x++x++a 100 40 25 10++x++" Run Me ;) "++x++"-}\n"++c1
++"d=["++show(d!!1)++",\n "++show(d!!2)++",\n "++show (d!!0)++
"]\n ::[Integer];f="++show f++c2++c3++c4++c5++c6++c7++c8++(concat.zipWith o[1
..8]$[c1,c2,c3,c4,c5,c6,c7,c8]))$replicate 42'-')
c1="import Data.Bits\n"
c2=";o n x=\"\\nc\"++show n++\"=\"++show x;a w h dw\n dh=zipWith(t w h dw dh)[("
c3="x,y)|y<-[0..h-1],x<-[0..w]]$cycle f;t w h dw dh(x,y)c\n |x==w='\\n'|testBit"
c4="(d!!0)(dw*dh-1-x*dw`div`(w+1)-y*dh`div`h*dw)=c|otherwise=' ';\n main=putStr"
c5="Ln$((\\x->\"{-\"++x++x++a 100 40 25 10++x++\" Run Me ;) \"++x++\"-}\\n\"++c1"
c6="\n ++\"d=[\"++show(d!!1)++\",\\n \"++show(d!!2)++\",\\n \"++show (d!!0)"
c7="++\n \"]\\n ::[Integer];f=\"++show f++c2++c3++c4++c5++c6++c7++c8++(concat"
c8=".zipWith o[1\n ..8]$[c1,c2,c3,c4,c5,c6,c7,c8]))$replicate 42'-')"