Code for problem 26B.
Code for problem 26D.
TLE on test #34.
Code for problem 35C.