Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Use set for intersect solution in Clear category for Mountain Scape by U.V
from typing import List, Tuple
def mountain_scape(tops: List[Tuple[int, int]]) -> int:
S = set()
for x0, y0 in tops:
for y in range(y0):
for x in range(x0-y0+y+1, x0+y0-y, 1):
S.add((x, y), )
return len(S)
Sept. 23, 2022
Comments: