Google Code Jam 2020 - Problem 3

I think I am the only who solve question 2 and 3 using stack. Anyone else try to solve both question using stack??

Thanks