摘要: 题目描述 Bessie is playing a video game! In the game, the three letters 'A', 'B', and 'C' are the only valid buttons. Bessie may press the buttons in any 阅读全文
posted @ 2018-01-13 21:18 蒟蒻JHY 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 题目背景 这是一道经典的Splay模板题——文艺平衡树。 题目描述 您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:翻转一个区间,例如原有序序列是5 4 3 2 1,翻转区间是[2,4]的话,结果是5 2 3 4 1 输入输出格式 输入格式: 第一行为n,m n表示 阅读全文
posted @ 2018-01-13 19:26 蒟蒻JHY 阅读(259) 评论(2) 推荐(1) 编辑
摘要: Time Limit: 20 Sec Memory Limit: 512 MB Description 一个长度为N的字符串S,求Σ(任意两个后缀的长度和-它们lcp长度的两倍) 一个长度为N的字符串S,求Σ(任意两个后缀的长度和-它们lcp长度的两倍) Input 一行,一个字符串S 一行,一个字 阅读全文
posted @ 2018-01-13 07:33 蒟蒻JHY 阅读(601) 评论(5) 推荐(0) 编辑