CDQ学习笔记

CDQ 分治学习笔记

学习的目的

在任何一个OIer的职业生涯中,都会碰到一些繁琐的数据结构题,而现在的省选有基本是数据结构大战,可见数据结构的重要性,但是和我说的CDQ有什么关系QAQ???
数据结构写起来,基本上就呵呵了,动不动两三百行的代码,调试时基本万念俱灰。。。(可能是我比较菜QAQ)
这个时候CDQ的用处就很明显的,写起来简单,写起来简单,写起来简单!!!

noip模拟赛2017.7.25

Thinking Bear #1

——NOIP 2014 提高组模拟赛

竞赛时间:2014 年 8 月 17 日 18:30-22:00

中文题目名称 拆地毯 还教室 皇后游戏
英文题目名称 carpet classroom game
每个测试点时限 1 秒 1 秒 1 秒
内存限制 512MB 512MB 512MB
测试点数目 10 20 20
每个测试点分值 10 5 5
是否有部分分
题目类型 传统型 传统型 传统型

二维树状数组入门题

Matrix (poj 2155)

传送门

Time Limit: 3000MS

Memory Limit: 65536K

Description

Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= i, j <= N).

We can change the matrix in the following way. Given a rectangle whose upper-left corner is (x1, y1) and lower-right corner is (x2, y2), we change all the elements in the rectangle by using “not” operation (if it is a ‘0’ then change it into ‘1’ otherwise change it into ‘0’). To maintain the information of the matrix, you are asked to write a program to receive and execute two kinds of instructions.

  1. C x1 y1 x2 y2 (1 <= x1 <= x2 <= n, 1 <= y1 <= y2 <= n) changes the matrix by using the rectangle whose upper-left corner is (x1, y1) and lower-right corner is (x2, y2).
  2. Q x y (1 <= x, y <= n) querys A[x, y].

noip模拟赛2017.7.20

题目名称 产品排序 分球 地图 数页码
提交文件 sort.* ball.* map.* count.*
输入文件 sort.in ball.in map.in count.in
输出文件 sort.out ball.out map.out count.out
时间限制 1s 1s 1s 1s
空间限制 128MB 128MB 128MB 32MB
题目来源 vijos vijos 模拟题 模拟题

manacher练习题

回文检测

做这道题的目的为了联系一下Manacher,也会专门再写一篇Manacher的专题

题目描述

据说如果你给无限只母牛和无限台巨型便携式电脑(有非常大的键盘),那么母牛们会制造出世上最棒的回文。你的工作就是去寻找这些牛制造的奇观(最棒的回文)。
在寻找回文时不用理睬那些标点符号、空格(但应该保留下来以便做为答案输出),只用考虑字母’A’-‘Z’和’a’-‘z’。要你寻找的最长的回文的文章是一个不超过20,000个字符的字符串。我们将保证最长的回文不会超过2,000个字符(在除去标点符号、空格之前)。

noip模拟赛2017.7.11

模拟试题(三)

【试题概览】

题目名称 中位数 敲砖块 单词 邮递员送信
提交文件 median.* brike.* words.* post.*
输入文件 median.in brike.in words.in post.in
输出文件 median.out brike.out words.out post.out
时间限制 1s 1s 1s 1s
空间限制 128MB 128MB 128MB 128MB
,