Bovine Acrobatics

Problem-Solving

I got an O(n^2) solution pretty early on that passed 9/15 test cases, but I just couldn't figure out a more optimized solution. The official solution is elegant, and I think I would've been able to get it if I'd focused more on looking at the order of the subtasks. I try to get the best solution I can right away, and that worked in bronze, but I think it's why I'm struggling a little bit with silver.

Implementation

Pseudo-code and implementation for 50% solution

Full Solution

Last updated