• 等级
  • 23244 访问
  • 202 原创
  • 3 转发
  • 26533 排名
  • 9 评论
  • 4 获赞

HDU-3555 Bomb (数位dp)

  Bomb   The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number ...

2019-01-12 21:22:28

HDU-2089 不要62 (数位dp)

不要62 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。  杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。  不吉利的数字为所有含有4或62的号码。例如:  62315 73418 88914  都属于不吉利号码。但是,61152虽然含有6和2,但不是62连号,所以不属于...

2019-01-12 21:07:58

Halloween treats (抽屉原理)

Halloween treats   Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets on that day, no matter how many children call on him, so...

2019-01-05 11:21:34

HTML

为了期末考试,不得不开始学习,这周一定要把CSS,JavaScript尽量都学完啊。这里记录一下我学的HTML的基础内容,免得过一段时间后什么都忘了,白浪费时间学了。 1.  charset   规定字符编码 : utf-8(包括所有国家语言)   gb2312  (简中)   gbk(简中+繁中)   一般中国主要用这三种 2. lang ="en"   告诉搜索引擎该页面的语言为英文 3...

2018-12-07 07:44:16

DES算法实现(密码学第四次实验作业)

DES算法是一种典型的Feistel结构的分组密码算法,它的明文分组长度为64bit,密钥分组长度为64bit,其中有8bit是奇偶校验,所以有效密钥长度为56bit。DES算法的加密和解密采用同一过程,安全性依赖有效密钥。 DES算法加密过程 大致过程 : IP初始置换——16轮迭代变换——IP逆置换   1.需要输入的数据: KEY:8字节密钥(64bit) MIN:8字节明文(6...

2018-12-01 19:28:42

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

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

2018-11-30 20:13:12

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

大数乘法: 就是模拟平时竖式相乘的过程,注意进位 代码: #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

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

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

2018-11-30 19:37:10

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

POJ - 1988 Cube Stacking (并查集)

Cube Stacking Farmer 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

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

Closest Common Ancestors Write 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

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

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

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

Critical Links (Tarjan 求割边)

Critical Links In 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

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

 Network of Schools A 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

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

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

2018-11-12 21:10:49

Network (Tarjan求割点个数)

Describle A 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

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

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

YOONGI

嘿嘿嘿
关注
  • 学生
  • 中国
奖章
  • 持之以恒