MCPcopy Create free account
hub / github.com/AxlLind/AdventOfCode / part2

Function part2

2018/src/11.py:11–17  ·  view source on GitHub ↗
(dp: list[list[list[int]]])

Source from the content-addressed store, hash-verified

9 return f"{xmax},{ymax}"
10
11def part2(dp: list[list[list[int]]]) -> str:
12 xmax,ymax,sizemax,v = 0,0,0,0
13 for size in range(2,300):
14 for x,y in product(range(1,300-size), repeat=2):
15 if dp[x][y][size] > v:
16 xmax,ymax,sizemax,v = x,y,size,dp[x][y][size]
17 return f"{xmax},{ymax},{sizemax}"
18
19@aoc.main('11')
20def main(indata: str) -> tuple[str,str]:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected