自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2021-09-20

vim指令操作 快捷键 光标左移 h 光标右移 l 光标上移 k 光标下移 j 移动到下一个单词 w 移动到上一个单词 b 移动到第n行(n默认值是1—G代表移动到最后一行) nG 移动到第一行 gg 回到上一次的光标位置 Ctrl+o 删除当前字符(nx代表连续删除n个字符) x 删除前一个字符 X 删除整行(ndd代表删除n行) dd 删除一个单词 dw 删除至

2021-09-20 10:45:10 77

原创 bilibili西瓜书白板推导day1

先验概率:指的是事情还没有发生,求这件事情发生的可能性大小。利用现有材料进行计算,大多是历史材料;后验概率:指的是事情已经发生,求这件事情发生的原因是由某个因素的可能性的大小,使用贝叶斯公式计算;极大似然估计:其建立在极大似然原理上,一个随机试验可能会出现若干结果。如果A出现了,那么认为实验条件对A的出现有利,即出现概率P(A)较大。通过函数求导得到极值点,求得极大似然估计。...

2020-09-18 00:18:07 299

原创 2018 CCPCfinal 感悟

第一次参加正式赛,其实心态还算稳,但是还是没有逃脱打铁的命运首先说说第一天的热身赛热身赛四道题,a了三道,签到题+数学期望+dfs。数学题A的过程比较曲折,由于样例给的很良心,其实也提供了一些思路,然后在这个过程中讨论了一下,后来改变了从前向后变为从后往前推的思路,过来全部样例就A了,所以说样例良心来着。dfs完全是队友搜索写得好。然后说第二天正式赛正式赛A题签到题,在队友敲的时候...

2018-11-28 00:33:04 953

原创 线性基

线性基的理解基(百度百科):在线性代数中,基是描述、刻画向量空间的基本工具。向量空间的基是它一个特殊的子集,基的元素称为向量基。向量空间中任意一个元素,都可以唯一地表示成基向量的线性组合。如果基中元素个数有限,那么称向量空间为有限维向量空间,将元素个数称为向量空间的维数。定义若干数的线性基是一组数,其中的最高位的1在第位通过线性基中元素出的数的值域与原来的数出的数的值域相同性质...

2018-11-11 22:52:44 608

原创 皮克定理

计蒜客--三角形内点在一个平面坐标系中,我们可以选出三个不全在一条线上的点构成一个三角形。我们称一个在三角形内(不包含三角形的边上),横纵坐标皆为整数的点位这个三角形的内点。 对于一个由(0,0)、(n,m)、(p,0)作为顶点构成的三角形,请你设计程序求出他的内点数。输入包括一行,包括三个用空格分隔的整数,分别为n,m,p(0 ≤ n < 32000,0 < m < 3...

2018-09-30 13:50:10 657

原创 2018-08-22 测试8

A  -- Raising Bacteria DescriptionYou are a lover of bacteria. You want to raise some bacteria in a box.Initially, the box is empty. Each morning, you can put any number of bacteria into the b...

2018-08-22 19:57:24 203

原创 2018-08-20 LCA

A  -- How far away ? DescriptionThere are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want to go from h...

2018-08-20 17:06:22 155

原创 2018-08-17 组合数学

A  --  错排 DescriptionHDU 2006'10 ACM contest的颁奖晚会隆重开始了!为了活跃气氛,组织者举行了一个别开生面、奖品丰厚的抽奖活动,这个活动的具体要求是这样的:首先,所有参加晚会的人员都将一张写有自己名字的字条放入抽奖箱中;然后,待所有字条加入完毕,每人从箱中取一个字条;最后,如果取得的字条上写的就是自己的名字,那么“恭喜你,中奖了!”大...

2018-08-19 18:57:32 187

原创 2018-08-16 数论

A  --  Eular质数筛法 Descriptionhttps://vjudge.net/problem/HihoCoder-1295Input第1行:1个正整数n,表示数字的个数,2≤n≤1,000,000Output第1行:1个整数,表示从1到n中质数的个数Sample Input9Sample Output4题目理解核心思想是一个非质数进行因数分...

2018-08-19 18:12:04 198

原创 2018-08-14 线段树

A  -- I Hate It Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( ...

2018-08-18 20:59:37 126

原创 2018-08-13 树状数组&离散化

A  -- Stars DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the s...

2018-08-17 20:08:13 397

原创 2018-08-11 训练6

B  -- The Bits DescriptionRudolf is on his way to the castle. Before getting into the castle, the security staff asked him a question:Given two binary numbers aa and bb of length nn. How many ...

2018-08-17 18:58:58 227

原创 2018-08-10 kmp

A  -- Number Sequence DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find ...

2018-08-17 08:43:05 206

原创 2018-08-09 Trie树&字符串hash

A  -- Can you find it? DescriptionMany people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text. Such numb...

2018-08-09 17:54:11 142

原创 2018-08-08 训练5

A  -- Can you find it? Description Input Output Sample Input Sample Output 题目理解

2018-08-09 17:13:36 103

原创 2018-08-07 最短路径&差分约束

A  -- HDU2544 Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=10000),N表示成都的大街上...

2018-08-08 16:25:55 249

原创 2018-08-06 并查集&最小生成树

A  -- The Suspects DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission ...

2018-08-06 17:30:55 300

原创 2018-08-04 训练4

A  -- Tri Tiling DescriptionIn how many ways can you tile a 3xn rectangle with 2x1 dominoes?Here is a sample tiling of a 3x12 rectangle.InputInput consists of several test cases followed b...

2018-08-05 21:29:15 323

原创 2018-08-03 区间DP和树形DP

A  -- 石子归并 Description现在有n堆石子,第i堆有ai个石子。现在要把这些石子合并成一堆,每次只能合并相邻两个,每次合并的代价是两堆石子的总石子数。求合并所有石子的最小代价Input第一行包含一个整数T(T<=50),表示数据组数每组数据第一行包含一个整数n(2<=n<=100),表示石子的堆数第二行包含n个正整数ai(ai<=100...

2018-08-05 21:27:37 257

原创 2018-08-02 DP初步

A  -- Race DescriptionDisky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months ...

2018-08-03 22:29:35 147

原创 2018-08-01 训练3

A  -- Pythagorean Theorem II DescriptionIn mathematics, the Pythagorean theorem — is a relation in Euclidean geometry among the three sides of a right-angled triangle. In terms of areas, it stat...

2018-08-01 22:11:43 199

原创 2018-07-30 bfs

A  -- Oil Deposits DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time...

2018-07-31 20:42:58 466

原创 2018-07-29 计算几何

D  -- 计算特殊多边形面积 DescriptionYou are going to compute the area of a special kind of polygon. One vertex of the polygon is the origin of the orthogonal coordinate system. From this vertex, you may ...

2018-07-31 19:53:51 178

原创 2018-07-28 七月月赛

A  -- 商 Description编一个程序求A/B的值 ,要求精确到小数点后N位(N<=80的自然数,并且A<B,A和B是整型 数范围),不足N位的用“0”补齐。例如:精确到小数点后9位:6/7=0.857142857。输入A、B、N, 求A/BInput输入文件: 只有一行,就是A,B,NOutput输出文件: 只有一行,就是A/B的结果Sample...

2018-07-28 19:00:40 469

原创 2018-07-26 递推、递归

A  --(●°u°●)​ 」(两道题基本相同) H -- ((゚Д゚) Description小时候我们都玩过爬楼梯的游戏:两人猜拳,赢了可向上爬一级,谁先到最高级则获胜。作为大学生,我们应该玩一个更有水平的游戏。现在一个人要上n级楼梯,每一步可以选择上一级或者上两级,但是不能后退。求上这n级楼梯的方案数。Input第一行只有一个整数T(1<=T<=45...

2018-07-28 18:26:29 237

原创 2018-07-25 训练1

A  -- Tricky Sum DescriptionIn this problem you are to calculate the sum of all integers from 1 to n, but you should take all powers of two with minus in the sum.For example, for n = 4 the sum...

2018-07-26 15:07:57 222

原创 2018-07-24 二分三分练习题

A  -- Can you find it? DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy ...

2018-07-25 16:13:28 570

原创 2018-07-23 STL练习题题解

A  -- Game Rank DescriptionThe gaming company Sandstorm is developing an online two player game. You have been asked to implement the ranking system. All players have a rank determining their pl...

2018-07-24 17:13:07 1385

原创 折半查找

简单的二分查找

2017-12-09 20:17:36 286

原创 HuffmanTree以及其编码

HuffmanTree以及其编码

2017-12-09 17:01:57 200

原创 邻接表存图

邻接表,储存有向图

2017-12-03 19:33:51 510 2

原创 前序——中序建树

前序——中序建树,后序遍历

2017-11-27 22:38:08 617

原创 二叉树的遍历--非递归操作

二叉树三种遍历方式

2017-11-22 18:50:28 140

原创 中跟遍历__非递归操作

非递归操作__使用栈实现,进行二叉树的中根遍历

2017-11-20 21:57:16 271

原创 先根遍历__非递归操作

非递归操作__使用栈实现,进行二叉树的先根遍历

2017-11-19 22:14:25 472

原创 先序列表建二叉树(带结束标识)

得到一串先根遍历的序列,其中*标识叶子节点的左右节点,非递归建立二叉树

2017-11-19 14:33:47 311

原创 kmp算法

kmp字符匹配算法

2017-11-04 12:48:41 139

原创 字符数组_串的实现

串的实现

2017-11-04 10:37:57 204

原创 线性表_顺序存储

线性表--顺序储存的基本操作

2017-10-29 13:12:37 278

空空如也

空空如也

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

TA关注的人

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