Problem 3547 · Hard

Maximum Sum of Edge Values in a Graph

A connected graph with degree at most two is a path or a cycle, and placing the values in a zigzag order along it maximizes the edge products.

Open the interactive visualisation