Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
---|---|---|---|---|---|---|
1 | CornerMercury | Python | 244 | 131 | 113 | 38 days ago |
2 | dbasden | C | 307 | 164 | 143 | 38 days ago |
#include
<stdio.h>
#define
GL
grid
[
#define
GI
GL
i
]
char
GL
4096
]
;
// fixme. why char?
int
i
,
total
;
#define
RECURSE
(
_n
)
if
(
GL
i
+
_n
]
==
GI
+
1
)
path_count
(
i
+
_n
)
;
void
path_count
(
int
i
)
{
if
(
GI
==
57
)
total
++
;
else
{
RECURSE
(
-64
)
RECURSE
(
64
)
RECURSE
(
-1
)
RECURSE
(
1
)
}
}
int
main
(
)
{
char
*
p
=
&
(
GL
64
]
)
;
while
(
scanf
(
"
%
s
"
,
p
+=
64
)
==
1
)
;
while
(
p
+=
4096
,
++
i
<=
4096
)
if
(
GI
==
48
)
path_count
(
i
)
;
printf
(
"
%
d
"
,
total
)
;
}