Jump to content

I'm a software engineer, get me out of here: Difference between revisions

m
(J: part 1)
Line 548:
One interpretation of this task would be that, for example, "4" means that it takes 6 hours to traverse that map position. Instead, it looks like "4" means we launch ourselves in one of eight directions and land four squares away -- this process takes one day. This concept adds some complexity to the task (we have to make sure we do not launch ourselves off the map, or outside the safe zones), but also reduces the size of intermediate results.
 
Anyways, here's how we can implement thispart 1:<syntaxhighlight lang=J>map=: <:,"_1 {.@>:@".@>>cutLF{{)n
00000
00003130000
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.