自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 二分图判定及最大匹配

二分图判定及最大匹配。

2022-08-07 14:55:00 99

转载 二分(模板)

二分(模板)

2022-08-06 09:42:18 161

原创 并查集(拓展域)

拓展域并查集

2022-08-06 08:40:30 176

原创 线段树笔记

线段树复习笔记

2022-05-29 19:42:05 111

原创 堆的操作。

堆的操作:1.插入一个数heap[++size]=x,up(size);在最后一个位置插入,在上移动找到合适位置2.求集合当中最小值heap[1]3.删除最小值heap[1]=heap[size];size--;down(1);把第一个点用最大值覆盖再把最大值移动到合适位置4.删除任意一个元素heap[k]=heap[size];size--;down(k),up(k);//二选一5.修改任意一个元素heap[k]=x;down(k),up(k);结构:完全二叉树每一个节点的值都小于左右儿子的

2022-05-25 15:11:02 220

原创 图论之关键路径

//拓扑排序(有向图且领接表)int topsort(struct graphh *gg){ int ss[N*2],top=-1;//栈 int k=0;//表示输出的元素个数 int flag[N];//判断是否访问过该元素 memset(flag,false,sizeof flag); for(int i=0;i<gg->n;i++) if(gg->rr[i]==0&&!flag[i...

2022-05-04 14:25:33 329

原创 树状数组+线段树

树状数组实际应用单点修改 + 区间和询问//树状数组 (前缀和、区间、点更新) const int N=10005;int n,a[N],b[N];//树状数组b int lowbit(int i){ return (-i)&i;}void add(int i,int z)//点更新,a[i]+z { for(i<=n;i+=lowbit(i))//更新所有后继 { b[i]+=z; }}int sum(int i)//前缀和 ,a[1].

2022-04-25 20:30:00 105

原创 图论之最小生成树

最小生成树

2022-04-18 20:15:00 467

原创 图论之最短路

.

2022-04-12 23:16:58 384

原创 Code For 1(一)分而治之

Jon fought bravely to rescue the wildlings who were attacked by the white-walkers at Hardhome. On his arrival, Sam tells him that he wants to go to Oldtown to train at the Citadel to become a maester, so he can return and take the deceased Aemon's place as

2022-03-21 15:13:03 296

原创 迷宫问题(Bfs)

迷宫问题 | JXNUOJ定义一个二维数组:int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。输入:一个5 × 5的二维数组,表示一个迷宫。数据保证有唯一解。输出:左上角到右下角的最短路径,格式如

2022-03-13 20:10:46 117

翻译 Charm Bracelet1.28

OpenJudge - 7113:Charm Bracelet描述Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from theN(1 ≤N≤ 3,402) available charms. Each charmiin the supplied list has a we...

2022-01-28 22:22:05 121

翻译 Maximum Sum Not Exceeding K1.27

OpenJudge - 16:Maximum Sum Not Exceeding K描述find two different numbers from them such that the sum of the two numbers is maximum but not exceeding K.输入First line: two positive integers N (N <= 1000) and K (K <= 1000000).Second line: N positi

2022-01-28 22:05:14 110

翻译 Duplicate Number​1,26

描述Given a sequence of N numbers, find a number A that the count of A in the sequence is at least two.输入First line: one positive integer N (N <= 1000).Second line: N positive integers (<= 1000000).输出One integer A.样例输入82 4 2 1 5 3 9 ..

2022-01-28 21:53:28 97

翻译 Zoos‘s Animal Codes 1.25

Zoos's Animal Codes | JXNUOJ描述:The speed of mail sorting is also known as postal code, or post code. Postal area code system has become one of the standards to measure the level of communication technology and postal service in a country.The post cod

2022-01-28 21:40:53 99

翻译 Teamwork1.24

Teamwork | JXNUOJ描述:There are N candidates. Each candidate has a cooperation value and a working value. Select a subset of candidates to form a team, such that the sum of cooperation values is positive and the sum of working values is maximum.输入:Fi

2022-01-28 20:33:19 69

翻译 Maximum sum1.23

​​​​​​OpenJudge - 1481:Maximum sum描述Given a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below: t1 t2 d(A) = max{ ∑ai + ∑aj | 1 <= s1 <= t1 < s2 <= t2 <= n }

2022-01-23 21:32:47 114

翻译 Post Office 1.22

Post Office | JXNUOJ描述:There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each village is identified with a single integer coordinate. There are no two villages in the sam

2022-01-22 08:55:18 95

翻译 Zipper 1.21

English translation

2022-01-21 14:03:50 67

翻译 Multiple of 3 Or 5

1.20描述:How many positive integers are there which is less than N and is a multiple of 3 or a multiple of 5.输入:One positive integer N (N <= 100000).输出:One integer.样例输入:100样例输出:46描述有多少个小于n的正整数是3或5的倍数输入一个正整数n输出一个数...

2022-01-20 09:42:42 276

翻译 Sum is K

描述:Given a sequence of N numbers. Find different numbers A and B in the sequence so that the sum of A and B equals to K.输入:First line: two positive integers N (N <= 1000) and K (K <= 1000000).Second line: N positive integers (<= 1000000).

2022-01-20 09:26:04 47

翻译 Chickens and Rabbits

English translation1.18

2022-01-20 00:53:13 90

翻译 Greatest Common Divisor​​​​​​​​​​​​​

English translation1.17

2022-01-20 00:32:57 178

空空如也

空空如也

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

TA关注的人

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