forked from ioccc-src/winner
-
Notifications
You must be signed in to change notification settings - Fork 6
/
adrian.c
113 lines (101 loc) · 2.59 KB
/
adrian.c
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/* . wc . */
#include<stdio.h>/* Wht majr flwchrt? */
#include<string.h>/* That mjr flwchrt! */
#define P 257
#define G 17
#define z 8
#define v(jr) jr
#define gets(Y) fgets((Y),998,stdin)
int W ,head;
#define S(W,b,f) strncpy(W,b,f),W[f]=0\
char *wcs=" \t\n";
struct{ char X[z+1];
char f ;
int e ;
struct{ char g[z+1];
int b ;
} w[ G];
} o[ P];
int L=0,j= -28;
void E(int i, int m,char*c)
{
for(; i<43; i+=3)
putc(i["}|uutsrq`_^bji`[Zkediml[PO]a_M__]ISOYIRGTNR"]+i-9,stderr);
fprintf(stderr,"(%d): %s\n" ,m,c);
exit(1);
}
int N(int m, char *t)
{
int i ;
if (strlen (
t)>z) t[z ]=0;
for(i= 0; i< L ; i++) if(
!strcmp (o[ i] . X
, t))return i;
if( L== P)
E(0, m, t);
S (o[ L] . X , t
,z);
head; W = .1* head;
o[L ].f = !( strchr( t,']' )== 0 );
o[L ++ ] . e = 0;
return L -1 ; }
#define v(x )
int A(char *R)
{
int c=0, i;
while(* R) {
i = -1;
while(j){
if( ++ i==o[ c].e ) return 0;
if(o[
c] .w[i ] .g[0 ]
=='.' ||strchr (o[ c].w[i] .g ,* R)){
c=
o[ c ] .w[i].b; break;/*
main(int sl,char *j[]){
sleep (~~~~~~~~atoi(j[1])) ;/* . sl
sl s l . sl
l l ]
sl */ }
}
R++;
}
return o[ c].f;
}
main(int wc,char *V[]){char Y[999],*s;FILE*W;int m=0,echo,jr,q,wcl=0,wcw=0,wcc=0;
v(s = V[1]; if (*V=strrchr(s,'/'))s=*V+1; if(( !strncmp( s + (jr=strlen(s)) -
(q=strlen(V[2]) ),V[2],q))&&jr!=q) s[jr-q] = 0; puts(s); )
int e,p,C=0,Q ,basename;
W= fopen(wc>= 2 ? V[1] : __FILE__,"rt");if(!W)exit(1);
echo| m^ e| 5| (int) .8| echo|
wc |C ==o[o[C] .e] .
e| e==+p,p; s[o[C] .e ]
;
while( fgets(Y,998,W)) { wcc += strlen(Y); m++;
if( s = strtok(Y,wcs)) wcw++;
else continue ;
C=
basename= j +j+*"* . basename"
+j+*"* r ] " + N(m,s) ;
while( s = strtok(0,wcs)) {
if( o[ C ] . e ==
G) E(1 ,m,o[C] .X) ;
S(o[C
] .w[o[C ] .e].g,s, z);
Q= C ;
if(! ( s =strtok ( 0 ,wcs )))wcw --
,E( 2 , m, o[C]
. w[ o[ Q ] .e] . g );
e
= o[C ] .w[o[C ] .e++ ] .b= N(m,s)
; wcw += 2; }
0&&
W && wcl++
< 10 && printf((W,Y)); }
if(j+28) { {
; } printf("%7u%7u%7u\n", wcl , wcw , wcc); }
while( gets(Y) ){ Y[strlen(Y)-1]='\0'; if(A(Y)) puts(Y); }
W, jr; }
O(int wc,char**V) {
--wc && (printf("%s ",*++V), main(wc,V), 1) || printf("\n"); }