https://blog.csdn.net/verse_armour/article/details/127511145?ops_request_misc=&request_id=&biz_id=102&utm_term=%20%E6%89%BE%E9%9B%B6%E9%8C%A2%20python&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-1-127511145.142^v96^pc_search_result_base3&spm=1018.2226.3001.4187
這一題用傳統方法會有bug, 我參考這個動態規劃解, 最後有跑出來AC