自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

转载 Codeforces Round #587 (Div. 2) C

http://codeforces.com/contest/1230/problem/CC. Anadi and DominoAnadi has a set of dominoes. Every domino has two parts, and each part contains some dots. For everyaaandbbsuch that1...

2019-09-24 15:19:00 73

转载 Codeforces Round #587 (Div. 3) E

http://codeforces.com/contest/1216/problem/E1E2. Numerical Sequence (hard version)You are given aninfinitesequence of form "112123123412345……" which consist of blocks of all consecutive p...

2019-09-22 15:06:00 131

转载 Educational Codeforces Round 73 (Rated for Div. 2)

D. Make The Fence Great Againhttp://codeforces.com/contest/1221/problem/D题意:给出n个篱笆,每个篱笆高度为a,一米的造价为b,要求相邻的两个篱笆高度不能相同,且每个篱笆的高度只能增加,求符合条件的最小造价;思路:首先:可以确定的是每个篱笆的增加高度不会大于2。例如:假设一个篱笆高度为1,左边为...

2019-09-20 16:51:00 123

转载 HDU1247(Hat’s Words)

Hat’s WordsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21250Accepted Submission(s): 7449Problem DescriptionA hat’s word is a ...

2019-09-14 16:25:00 91

转载 HDU1251(统计难题)(字典树模板题

统计难题Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 69587Accepted Submission(s): 24087Problem DescriptionIgnatius最近遇到一个难题,老师交给他很...

2019-09-14 16:17:00 86

转载 HDU1525(Euclid's Game)规律博弈

Problem DescriptionTwo players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of the lesser of the two numbers from the greate...

2019-09-10 16:56:00 87

转载 Codeforces Round 72 (Rated for Div. 2) D

http://codeforces.com/contest/1217/problem/DD. Coloring Edgestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output...

2019-09-07 12:22:00 70

转载 A Magic Lamp(HDU - 3183)

Kiki likes traveling. One day she finds a magic lamp, unfortunately the genie in the lamp is not so kind. Kiki must answer a question, and then the genie will realize one of her dreams.The quest...

2019-08-26 23:23:00 102

转载 CodeForces - 488D (Strip)

StripAlexandra has a paper strip withnnumbers on it. Let's call themaifrom left to right.Now Alexandra wants to split it into some pieces (possibly1). For each piece of strip, it m...

2019-08-22 22:23:00 303

转载 Frequent values(HDU - 1806 )

Frequent valuesYou are given a sequence of n integers a1, a2, ... , anin non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 ≤ i ≤...

2019-08-22 22:23:00 125

转载 Balanced Lineup(POJ - 3264)

Balanced Lineup(POJ - 3264)For the daily milking, Farmer John'sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee wi...

2019-08-22 22:23:00 61

转载 ST表

ST表类似树状数组,线段树这两种算法,是一种用于解决区间最值查询问题的离线算法。与线段树相比,预处理复杂度同为O(nlogn),但查询复杂度ST表为O(1),比线段树查询O(lgN)小,但就不涉及修改的区间查询而言,ST表无疑是更好的选择。ST表主体,即st[i][j],表示数据数组a[ ]从下标i开始的长度为2^j的最值,即st[i][j]=max/min(a[i],a[i+1]....

2019-08-22 22:23:00 80

转载 DFS,BFS算法

粗略的讲一下这两种算法,为老年痴呆做好准备(ノへ ̄、)DFS:如上图,你将搜索整张图,而DFS的搜索方法就是,先一味的往前走!走到某个尽头后发现无路可走,后退。咦?后退一步有一个分岔口,这里有多个支路,选择一条没走过的继续走,碰到死胡同,后退,又到了这个分岔口,再去选择没走过的路,直到无路可走,然后返回上一个分岔口。具体过程如下: ...

2019-07-30 20:57:00 96

转载 浙江理工大学7月月赛

比赛网址http://47.96.116.66/contest.php?cid=1376A题:分组题目描述小明的班级在上体育课,老师想让大家分成两组玩拔河。现在大家排成了一排,老师嫌麻烦,所以想直接在队伍中间找个位置断开,这样不就分成了两组了吗?但是这个老师的思维很奇怪,他觉得分成人数相等的两组会不公平,他想让两组的体重和的差最小(差值要求体重和大的值减小的值)。...

2019-07-11 16:39:00 365

转载 矩阵快速幂

(这是博主的第一篇随笔,如有错误,敬请斧正)。1:了解快速幂。先把快速幂的代码呈上来。这里要解释一下位运算‘&’和‘>>’。‘&’通常用于二进制取位操作,例如一个数 & 1 的结果就是取二进制的最末位。而‘>>’则是右移运算符,可以二进制去掉最后一位数字(相当于除二)。那么,快速幂到底是什么意思?举个例子,计算9^10。...

2019-03-26 18:48:00 57

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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