摘要: 这是一个dp题,可以用4维数据来表示所有的状态。 但是有一个需要注意的点,一般来说,对于每个坐标,有拿跟不拿两种情况,如果没有拿任务宝物的状态表示为0,那么拿取了价值为0的宝物时,要以另一种情况来跟没拿区分。 处理的方法就是将所有宝物的价格+1。 long long dp[55][55][15][1 阅读全文
posted @ 2024-03-09 22:21 _Yxc 阅读(16) 评论(0) 推荐(0)
摘要: It's a simple problem on codeforces. we traverse the through the string n, if we encouter a '1', we add a new string to ans and set stop to false.Othe 阅读全文
posted @ 2024-03-09 21:25 _Yxc 阅读(10) 评论(0) 推荐(0)