差分
invoKer-
这个作者很懒,什么都没留下…
展开
-
CodeForces - 17E Palisection【Manacher】【前缀和】【差分】
题目链接:https://codeforces.com/contest/17/problem/E #include <iostream> #include <cstdio> #include <cstring> using namespace std; static const int MAXN=1e6+10; char b[MAXN],n[MAXN]; int p; int power(int a,int b,int p) { int res=1%p;原创 2020-10-06 21:02:10 · 131 阅读 · 0 评论 -
POJ - 3263 Tallest Cow【差分】
【题目描述】 FJ’s N (1 ≤ N ≤ 10,000) cows conveniently indexed 1…N are standing in a line. Each cow has a positive integer height (which is a bit of secret). You are told only the height H (1 ≤ H ≤ 1,000,00...原创 2019-09-12 14:36:39 · 88 阅读 · 0 评论 -
CCF-CSP 201809-2 买菜【差分】【水题】(100分)
试题编号: 201809-2 试题名称: 买菜 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 小H和小W来到了一条街上,两人分开买菜,他们买菜的过程可以描述为,去店里买一些菜然后去旁边的一个广场把菜装上车,两人都要买n种菜,所以也都要装n次车。具体的,对于小H来说有n个不相交的时间段[a1,b1],[a2,b2]…[an,bn]在装车,对于小W来说有n个不相交的时间...原创 2019-09-09 21:29:09 · 369 阅读 · 0 评论