|
|
back to boardNeed to add another test — currently it's possible to get Accepted with a partial solution Posted by bdm 19 Jun 2026 15:12 For example: text 5 5 1 2 2 4 3 4 1 3 3 5 2 5 Optimal route: Start with the 'down' gear. 2→1: go downhill (0 shifts, gear stays 'down'). 1→3: go uphill → 1 shift (gear becomes 'up'), score = 1. 3→5: go uphill (0 shifts). Total: 1 shift. My algorithm outputs 2 because it doesn't account for the current gear when storing distances. Nevertheless, I got Accepted. |
|
|