自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 大数除法,大数辗转相除(密码学第三次实验作业)

大数除法:把除法运算转化为减法运算代码:#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;#define N 1000005char a[N],b[N];int x[N],y[N],c[N<<1];//用长度为len1的大整数p1...

2018-11-30 20:13:12 823

原创 大数乘法(密码学第二次实验作业)

大数乘法: 就是模拟平时竖式相乘的过程,注意进位代码:#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;char a[1000005],b[1000005];int x[1000005],y[1000005],c[2000005];int ma...

2018-11-30 19:43:52 448

原创 大整数加减法(密码学第一次实验作业)

大数加法:(两个正整数相加) 以字符串的形式输入,然后将两个字符串倒转转换成int形式存在数组中,再进行加法模拟。例如:  123456789 +11111111  1.转换成int              x :   9 8 7 6 5 4 3 2 1                               y :   1 1 1 1 1 1 1 12.像平时做加法一样...

2018-11-30 19:37:10 700

原创 POJ - 2236 Wireless Network (并查集)

Wireless Network An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all...

2018-11-27 21:43:30 99

原创 POJ - 1988 Cube Stacking (并查集)

Cube StackingFarmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Be...

2018-11-27 14:43:37 159

原创 POJ - 1470 Closest Common Ancestors(LCA 离线tarjan)

Closest Common AncestorsWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tr...

2018-11-16 21:04:12 178

原创 POJ 1523 SPF (割点+连通块)

SPF Consider the two networks shown below. Assuming that data moves around these networks only between directly connected nodes on a peer-to-peer basis, a failure of a single node, 3, in the netwo...

2018-11-14 18:53:05 158

原创 POJ - 2117 Electricity(Tarjan +割点+连通块)

Electricity Blackouts and Dark Nights (also known as ACM++) is a company that provides electricity. The company owns several power plants, each of them supplying a small area that surrounds it. Th...

2018-11-14 16:09:58 333 1

原创 Strongly connected (强连通分量 Tarjan+缩点)

Strongly connected Give a simple directed graph with N nodes and M edges. Please tell me the maximum number of the edges you can add that the graph is still a simple directed graph. Also, after yo...

2018-11-13 19:58:54 439

原创 Critical Links (Tarjan 求割边)

Critical LinksIn a computer network a link L, which interconnects two servers, is considered critical if there are at least two servers A and B such that all network interconnection paths between...

2018-11-13 13:14:27 144

原创 POJ1236 Network of Schools (强连通分量 Tarjan+缩点)

 Network of SchoolsA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes softwa...

2018-11-12 21:52:51 137

原创 HDU1269 迷宫城堡 (强连通分量 Tarjan)

迷宫城堡为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请你写个程序确认一下是否任意两个房间都是相互连通的,即:对于任意的i和j,至少存在一条路径可以从房间...

2018-11-12 21:10:49 123

原创 Network (Tarjan求割点个数)

DescribleA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N. No two places have the same number. The l...

2018-11-10 09:35:03 437

原创 ACM Computer Factory (拆点+EK算法)

ACM Computer Factory As you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is why all these computers are historically produced a...

2018-11-05 20:29:31 190

原创 POJ 1459 Power Network (多源点最大流 EK)

A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0...

2018-11-05 20:01:51 203

原创 Drainage Ditches (最大流 EK dinic)

Drainage Ditches Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long tim...

2018-11-03 21:47:42 163

空空如也

空空如也

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

TA关注的人

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