Introduction - If you have any usage issues, please Google them yourself
Dynamic Programming: The first line contains two numbers R and C (2 ≤ R, C ≤ 1500) for the rectangular block of length and width. Then there are R lines, each with C a string separated by spaces, or to A at the beginning of the string (for Apple), or to B at the beginning (for banana), followed by an integer of not more than 99, indicating the corresponding number of trees.