
前缀和
文章平均质量分 56
前缀和
Charon_HN
地摊炼丹大师、科研农民工、乡野程序员
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
牛客 K串 哈希+前缀和+莫队
题目链接 题目描述: ZZT 得到了一个字符串 S 以及一个整数 K。 WZH 在 1995 年提出了“优雅 K 串”的定义:这个字符串每一种字符的个数都是 K 的倍数。 现在 ZZT 想要对字符串进行 Q 次询问,第 i 次询问给出一个区间 [Li, Ri],他想计算 [Li, Ri] 中有多少个子串是“优雅 K 串”。 由于 ZZT 忙于工作,所以他把这个问题交给了你,请你帮忙解决。 输入描述: 第一行输入一个正整数 K。 第二行输入一个字符串 S。 第三行输入一个正整数 Q,表示有 Q 次询问。 接下原创 2021-04-08 16:22:20 · 261 阅读 · 0 评论 -
2018.3.4【 AtCoder - 3620 】解题报告(前缀和,dp)Upc J: Snuke Festival
C - Snuke Festival Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement The season for Snuke Festival has come again this year. First of all, Ringo will perform a ritual t...原创 2018-08-03 17:30:22 · 208 阅读 · 0 评论 -
杭电多校contest4 1005 Matrix from Arrays 容斥+前缀
中给出了样例解释More... Problem E. Matrix from Arrays Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 761 Accepted Submission(s): 233 P...原创 2018-08-02 16:51:25 · 148 阅读 · 0 评论 -
Codeforces Round #481 (Div. 3) ---- E. Bus Video System(思维)前缀和
https://cn.vjudge.net/contest/245783#problem/E E. Bus Video System time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The busses in ...原创 2018-08-12 19:48:46 · 254 阅读 · 0 评论 -
POJ 3484 二分前缀和
Data-mining huge data sets can be a painful and long lasting process if we are not aware of tiny patterns existing within those data sets. One reputable company has recently discovered a tiny bug in ...原创 2018-11-05 12:24:35 · 247 阅读 · 0 评论 -
POJ 2566-Bound Found(变形尺取法)
Signals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (that must be going through a defiant phase: "But I want to use feet, no...原创 2019-04-01 17:17:26 · 392 阅读 · 1 评论 -
二维前缀和
6 6 3 2 2 4 4 3 3 5 6 5 1 6 2 2 3 2 5 4 1 5 6 5原创 2019-04-21 22:21:42 · 369 阅读 · 0 评论 -
Largest Allowed Area (前缀和+二分)
题目描述 A company is looking for land to build its headquarters. It has a lot of money and can buy as many land patches as it needs. Its goal, however, is finding the largest square region containing no ...原创 2019-04-29 17:52:01 · 342 阅读 · 0 评论 -
2019牛客暑期多校训练营(第三场) B题
Crazy Binary String 题意:给你一个长度为n的01字符串,问该字符串中01个数相等的最长子串和子序列分别是多少。 分析: 首先,大家要知道什么是子序列,什么是子串,子序列是不一定是连续的,它可以是原串中任意元素按照相对位置组成的序列,但是子串就不是了,子串一定是连续的,不可分割的按照绝对位置组成的序列。 知道这个概念之后,大家可以明显的看出,子序列这个答案好求,就是暴力一下,...原创 2019-07-25 20:57:21 · 684 阅读 · 0 评论