随笔分类 -  迷之尺取

摘要:题目链接:http://codeforces.com/contest/814/problem/C 题目: 题意:给你一个长度为n的字符串,m次查询,每次查询:最多进行k步修改,求字符c(要输入的字符)最长连续的长度。 思路:尺取法,预处理出每个字符连续长度为k需要的代价,然后O1查询。 代码实现如下 阅读全文
posted @ 2018-08-14 12:31 Dillonh 阅读(198) 评论(0) 推荐(0)
摘要:B. Complete the Word time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder loves 阅读全文
posted @ 2018-01-20 20:31 Dillonh 阅读(227) 评论(0) 推荐(0)