An and Bin are going home from the forest. Some direction signs have gone missing. The map labels their homes and starting positions; Dòng sông means River.
They follow these rules:
- Travel only along the grid lines.
- Start in the direction of the first large black arrow.
- Continue straight until reaching another arrow, then follow its direction. Repeat until home.
They cannot swim across the river and must use one of the two bridges.
How many ways can one right-pointing arrow and two upward-pointing arrows be added so that both An and Bin reach their own homes?
Editorial placement clarification: put the new arrows at unused marked intersections; keep the printed arrows and starting positions unchanged.