• Consider the grid as Chessboard and partition the positions into White and Black colors.
  • Add edges from Whites to Blacks if that white and black are adjacent.
  • Create a dummy white and dummy black node. Consider that the dummies are adjacent to all positions.
  • Run Min Cost Max Flow with the layout Source -> Whites -> Blacks -> Sink where Source -> White and Black -> Sink edges has capacity 1 and cost the negated value of the strength of the titan at that position. For dummies however, capacity = n, cost = 0.

Statistics

77% Solution Ratio
tmwilliamlin168Earliest, Dec '19
nusuBotFastest, 0.3s
AnachorLightest, 3.0 MB
NirjhorShortest, 2712B
Toph uses cookies. By continuing you agree to our Cookie Policy.