riba2534的博客

qq:735632581

排序:
默认
按更新时间
按访问量

我的个人网站上线啦!欢迎访问:www.riba2534.cn

目前还在开始阶段,没有什么内容,不过以后会慢慢更新的,欢迎访问哦!网址是:www.riba2534.cn

2017-05-23 13:52:50

阅读数:1193

评论数:6

HDU6409 没有兄弟的舞会(2018百度之星复赛,贪心)

Problem Description 度度熊、光羽、带劲三个人是好朋友。 度度熊有一棵n个点的有根树,其中1号点为树根。除根节点之外,每个点都有父节点,记i号点的父节点为fa[i]。 度度熊称点i和点j是兄弟(其中i≠j)当且仅当fa[i]=fa[j]。 第i个点的权值...

2018-08-20 10:38:56

阅读数:11

评论数:0

洛谷P3809 【模板】后缀排序(后缀数组)

题目背景 这是一道模板题。 题目描述 读入一个长度为 nn 的由大小写英文字母或数字组成的字符串,请把这个字符串的所有非空后缀按字典序从小到大排序,然后按顺序输出后缀的第一个字符在原串中的位置。位置编号为 11 到 nn 。 输入格式: 一行一个长度为 nn...

2018-08-18 11:58:01

阅读数:17

评论数:0

后缀数组详解

后缀数组详解 什么是后缀数组 后缀数组是处理字符串的有力工具 —罗穗骞 个人理解:后缀数组是让人蒙逼的有力工具! 就像上面那位大神所说的,后缀数组可以解决很多关于字符串的问题, 譬如P3809 【模板】后缀排序 注意:后缀数组并不是一种算法,而是一种思想。 实现它的方法主...

2018-08-18 11:39:38

阅读数:16

评论数:0

HDU6406 Taotao Picks Apples(2018HDU多校联赛第八场,线段树)

Problem Description There is an apple tree in front of Taotao’s house. When autumn comes, n apples on the tree ripen, and Taotao will go to pick ...

2018-08-17 10:19:35

阅读数:35

评论数:0

HDU6400 Parentheses Matrix(2018HDU多校联赛第八场,构造)

Problem Description A parentheses matrix is a matrix where every element is either ‘(’ or ‘)’. We define the goodness of a parentheses matrix as ...

2018-08-15 23:41:18

阅读数:30

评论数:0

HDU6401 Magic Square(2018HDU多校联赛第八场,模拟)

Problem Description A magic square is a 3×3 square, where each element is a single digit between 1 and 9 inclusive, and each digit appears exactl...

2018-08-15 23:01:23

阅读数:20

评论数:0

BUCTOJ String(Hash,二分)

思路 我们可以二分一下答案的长度,然后在判断当前长度是否可行。 因为T串是S串的子串,所以一定会匹配。利用Hash记录一下当前枚举的串出现了几次,记录一下当前枚举的串上次出现的位置。当串出现的次数>=k的时候就证明当前枚举的长度可行 代码 #inclu...

2018-08-15 09:44:12

阅读数:15

评论数:0

HDU6395 Sequence(2018HDU多校联赛第七场,整数分块,矩阵快速幂)

Problem Description Let us define a sequence as below ⎧⎩⎨⎪⎪⎪⎪⎪⎪F1F2Fn===ABC⋅Fn−2+D⋅Fn−1+⌊Pn⌋{F1=AF2=BFn=C⋅Fn−2+D⋅Fn−1+⌊Pn⌋\left\{\begin{eqna...

2018-08-14 18:22:55

阅读数:34

评论数:0

HDU6370 Werewolf(2018HDU多校联赛第六场,思路,dfs)

Problem Description “The Werewolves” is a popular card game among young people.In the basic game, there are 2 different groups: the werewolves an...

2018-08-09 23:17:29

阅读数:40

评论数:0

HDU6373 Pinball(2018HDU多校联赛第六场,物理)

Problem Description There is a slope on the 2D plane. The lowest point of the slope is at the origin. There is a small ball falling down above th...

2018-08-09 16:03:01

阅读数:80

评论数:1

HDU6362 oval-and-rectangle(2018HDU多校联赛第六场,数学,积分)

Problem Description Patrick Star find an oval. The half of longer axes is on the x-axis with length a. The half of shorter axes is on the y...

2018-08-09 10:40:50

阅读数:79

评论数:0

HDU6356 Glad You Came(2018HDU多校联赛第五场,线段树)

Problem Description Steve has an integer array a of length n (1-based). He assigned all the elements as zero at the beginning. After that, he mad...

2018-08-07 19:16:39

阅读数:29

评论数:0

HDU6354 Everything Has Changed(2018HDU多校联赛第五场,计算几何)

Problem Description Edward is a worker for Aluminum Cyclic Machinery. His work is operating mechanical arms to cut out designed models. Here is a...

2018-08-07 17:04:48

阅读数:37

评论数:0

HDU6351 Beautiful Now(2018HDU多校联赛第五场,思路)

Problem Description Anton has a positive integer n, however, it quite looks like a mess, so he wants to make it beautiful after k swaps of digits...

2018-08-07 15:53:09

阅读数:99

评论数:0

BZOJ1878 [SDOI2009]HH的项链(莫队算法)

Description HH有一串由各种漂亮的贝壳组成的项链。HH相信不同的贝壳会带来好运,所以每次散步 完后,他都会随意取出一 段贝壳,思考它们所表达的含义。HH不断地收集新的贝壳,因此他的项链变得越来越长。有一天,他突然提出了一 个问题:某一段贝壳中,包含了多少种不同的贝壳...

2018-08-04 18:55:01

阅读数:26

评论数:0

莫队算法详解

莫队算法详解 转载自:莫队算法详解 本文在本人新博客的链接:http://www.myblog.link/2016/01/26/MO-s-Algorithm/ 本文翻译自MO’s Algorithm (Query square root decomposition),作者anudeep2...

2018-08-04 18:49:18

阅读数:32

评论数:0

Educational Codeforces Round 48 (Rated for Div. 2) D. Vasya And The Matrix(构造)

描述 Now Vasya is taking an exam in mathematics. In order to get a good mark, Vasya needs to guess the matrix that the teacher has constructed! ...

2018-08-04 11:48:51

阅读数:70

评论数:0

HDU6341 Problem J. Let Sudoku Rotate(2018HDU多校联赛第四场,数独,DFS)

Problem Description Sudoku is a logic-based, combinatorial number-placement puzzle, which is popular around the world. In this problem, let us...

2018-08-04 09:07:11

阅读数:51

评论数:0

HDU6342 Problem K. Expression in Memories(2018HDU多校联赛第四场,模拟)

Problem Description Kazari remembered that she had an expression s0 before. Definition of expression is given below in Backus–Naur form. :...

2018-08-03 10:10:08

阅读数:25

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭