Project 3 Notes

🔙HOME

First Things First

Quiz 4. 15 minutes, closed-book

  • On Canvas
  • Access code: component

Routing Wires

Example input:

7
7
8
1 2 2 2
2 1 2 2
1 4 2 4
2 4 2 6
4 1 4 2
4 2 5 2
4 4 5 4
4 4 4 5
2
1 1 5 5
3 3 1 5

The input board (with no wire):

0 0 0 0 0 0 0
0 1 -1 0 -1 2 0
0 -1 -1 0 -1 -1 -1
0 0 0 2 0 0 0
0 -1 -1 0 -1 -1 0
0 0 -1 0 -1 1 0
0 0 0 0 0 0 0

Connect the 1st wire (1-1):

0 0 0 0 0 0 0
1 1 -1 0 -1 2 0
1 -1 -1 0 -1 -1 -1
1 0 0 2 0 0 0
1 -1 -1 0 -1 -1 0
1 1 -1 0 -1 1 0
0 1 1 1 1 1 0

Connect the 2nd wire (2-2):

0 0 0 2 2 2 0
1 1 -1 2 -1 2 0
1 -1 -1 2 -1 -1 -1
1 0 0 2 0 0 0
1 -1 -1 0 -1 -1 0
1 1 -1 0 -1 1 0
0 1 1 1 1 1 0

Total length of all wires: 20

Date: 2023-11-10 Fri 00:00

Author: Tianyu Chen

Created: 2023-11-10 Fri 09:52