Skip to content

Commit 6a2fa4e

Browse files
committed
Add max route lengths
1 parent eb52b31 commit 6a2fa4e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/scala/ru/org/codingteam/icfpc_2025/Domain.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package ru.org.codingteam.icfpc_2025
22

33
import upickle.ReadWriter
44

5-
case class ProblemDefinition(name: String, size: Int)
5+
case class ProblemDefinition(name: String, size: Int, maxRouteLength: Int)
66
object ProblemDefinition {
77
def byName(name: String): ProblemDefinition =
88
ProblemDefinition(
@@ -14,7 +14,15 @@ object ProblemDefinition {
1414
case "tertius" => 18
1515
case "quartus" => 24
1616
case "quintus" => 30
17-
case _ => throw new Exception(s"Unknown problem name: $name.")
17+
case _ => throw new Exception(s"Unknown problem name: $name."),
18+
name match
19+
case "probatio" => 54
20+
case "primus" => 108
21+
case "secundus" => 216
22+
case "tertius" => 324
23+
case "quartus" => 432
24+
case "quintus" => 540
25+
case _ => throw new Exception(s"Unknown problem name: $name."),
1826
)
1927
}
2028
case class SolutionDefinition(

0 commit comments

Comments
 (0)