摘要:
题目: For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether th 阅读全文
摘要:
题目传送门 For a sequence $t_{1...n}$we define the weight of it is the number of pairs $(i,j)$satisfy \(i<j\) and \(t_i>t_j\) Now give you a permutation a_ 阅读全文
摘要:
liympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many times, he is tired of such easy 阅读全文
摘要:
A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools t 阅读全文
摘要:
1- SDOI 染色 给定一棵有 n 个节点的无根树和 m 个操作,操作共两类。 将节点 a 到节点 b 路径上的所有节点都染上颜色; 询问节点 a 到节点 b 路径上的颜色段数量,连续相同颜色的认为是同一段,例如 112221 由三段组成:11 、 222、1。 请你写一个程序依次完成操作。 分析 阅读全文