Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude DesktopThe organizer’s problem statement is available at the official source link.
sample trace
Cow Routing II: sample trace
The older official page gives this concrete sample for Cow Routing II. Follow the task rules from these input values to the expected result.
Published input1 2 3
3 3
3 2 1
4 4
2 1 4 3
8 5
4 1 7 8 2modelAlgorithm ideaApply the task rule to this published instance, preserving the relationships defined by the statement.task resultExpected output7
SOLUTION NOTES:
Use route 2 to travel from city 1 to city 3, then route 1 to travel
from city 3 to city 2.
- 1
Read the sample
Use the official example for Cow Routing II as the concrete instance. - 2
Follow the task relation
Apply the exact rule in the official statement to the displayed values. - 3
Check the result
Verify that the final value matches the published expected output.
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|12 lines, 156 charsRun output
Run your code to see output.