Live2d Test Env
摘要: Times:5000ms; Memory limit:262144 kB 给定字符串S(|S|<=5000),下标由1开始。然后Q个问题(Q<=1e6),对于每个问题,给定L,R,回答区间[L,R]里有多少个回文串。 请想出两种或者以上的方法。 分界线 方法1:区间DP。 容斥一下,dp[i][j] 阅读全文
posted @ 2018-03-14 21:00 nimphy 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game 阅读全文
posted @ 2018-03-14 16:43 nimphy 阅读(328) 评论(0) 推荐(0) 编辑
摘要: Ivan has n different boxes. The first of them contains some balls of n different colors. Ivan wants to play a strange game. He wants to distribute the 阅读全文
posted @ 2018-03-14 16:01 nimphy 阅读(530) 评论(0) 推荐(0) 编辑