自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 资源 (5)
  • 收藏
  • 关注

原创 poj 3292 Semi-prime H-numbers (打表 同余模运算)

http://poj.org/problem?id=3292题意:H-number为mod 4=1的数H-prim为除了1和本身外不能被任何H-number整除的数H-semi-prime为两个H-prim的乘积求1-h有多少个H-semi-prime;思路:打表#include #include #include #include #include #inc

2016-05-31 17:00:30 352

原创 poj 2635 The Embarrassed Cryptographer(同余模运算)

http://poj.org/problem?id=2635题意:给出一个大数K和一个数L,判断是否存在一个小于L的素数能够整除K,存在的话输出最小的那个素数同余定理:1234%3可以分解为1%3=1(1*10+2)%3=0(0*10+3)%3=0(0*10+4)%3=1则1234对3取余得1,大数亦如此,但是本题中需要将这个大数分为多个1000进制的数,10进

2016-05-31 14:59:57 370

原创 hdu 1115 Lifting the Stone (凸包求多边形重心)

http://acm.hdu.edu.cn/showproblem.php?pid=1115Lifting the StoneTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7107    Accepted Submis

2016-05-30 21:20:41 447

原创 第四届河南省省赛 走迷宫(二分+DFS)

http://acm.nyist.net/JudgeOnline/problem.php?pid=306走迷宫时间限制:1000 ms  |  内存限制:65535 KB难度:5描述Dr.Kong设计的机器人卡多非常爱玩,它常常偷偷跑出实验室,在某个游乐场玩之不疲。这天卡多又跑出来了,在SJTL游乐场玩个不停,坐完碰碰车,又玩滑滑梯,这时卡多又走入一

2016-05-30 20:31:45 690

原创 hdu 3037 Saving Beans (Lucas)

http://acm.hdu.edu.cn/showproblem.php?pid=3037Problem DescriptionAlthough winter is far away, squirrels have to work day and night to save beans. They need plenty of food to get through th

2016-05-28 19:20:24 570

原创 hdu 1211 RSA(逆元)

http://acm.hdu.edu.cn/showproblem.php?pid=1211Problem DescriptionRSA is one of the most powerful methods to encrypt data. The RSA algorithm is described as follow:> choose two large prim

2016-05-28 16:01:30 588

原创 hdu 2669 Romantic (乘法逆元)

http://acm.hdu.edu.cn/showproblem.php?pid=2669 什么叫乘法逆元?        这里,我们称 x 是 a 关于 m 的乘法逆元    这怎么求?可以等价于这样的表达式: a*x + m*y = 1    看出什么来了吗?没错,当gcd(a , m) != 1 的时候是没有解的这也是 a*x + b*y

2016-05-26 11:13:15 395

转载 费马小定理

(选自《数论妙趣——数学女王的盛情款待》第六章 开门咒)数论中充斥着许多易于观察到的事实,诱使人们用普通归纳推理的办法去进行推广。对此,必须慎之又慎,以免误入陷阱。设想你偶而把2自乘7次,再减去2,得27-2=126,随后发现,126恰好能被2的幂指数7整除。接着又发现,25-2=30,30也能被2的幂指数5整除;211-2=2048,2048也能被2的幂指数11整除。从7,5,1

2016-05-26 09:19:10 470

原创 poj 2594 Treasure Exploration (最小路径覆盖+Floyd缩点)

http://poj.org/problem?id=2594Treasure ExplorationTime Limit: 6000MS Memory Limit: 65536KTotal Submissions: 7759 Accepted: 3196DescriptionHave you ever re

2016-05-17 11:32:53 420

原创 bestcoder 2016百度之星资格赛 1001 (逆元)

http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=690&pid=1001度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到:H(s)=\pr

2016-05-14 14:55:21 778

原创 hdu 3336 Count the string (kmp + dp)

http://acm.hdu.edu.cn/showproblem.php?pid=3336题意:给出一个长度为n的字符串,求出该字符串的所有前缀出现的总次数思路:kmp求出该字符串的next数组,第i个位置dp[i]可有dp[next[i]]+1得到#include #include #include #include #include using namespace s

2016-05-12 19:01:01 497

原创 CodeForces 627B Factory Repairs

http://codeforces.com/contest/627/problem/B题意:有n个机器,机器非正常时每天生产b个物品,正常时每天生产a个物品,维修机器需要花费连续的k天(这k天什么都不能做)。有q次操作1 a d,表示在d天有a个要求(每个要求需要一个物品)2 p,表示从p天开始维修。(每一次维修是独立的)机器初始是非正常的。对每一个2操

2016-05-12 17:53:39 365

原创 CodeForces 626C Block Towers(二分)

http://codeforces.com/problemset/problem/626/C题意:有n个人每次可以放两个积木,m个人,每次可以放3个积木,最后每个人堆得高度都不同,求最大的高度最小是多少;二分查找这个高度high,这个high满足2的倍数大于等于n,3的倍数大于等于m,high减掉2和3的最小公倍数6的倍数的个数大于等于m+n;#include #include

2016-05-12 14:10:43 352

原创 hdu 3374 String Problem (最大最小表示法)

http://acm.hdu.edu.cn/showproblem.php?pid=3374SKYLONG 1KYLONGS 2YLONGSK 3LONGSKY 4ONGSKYL 5NGSKYLO 6GSKYLON 7题意:输出的是最小字典序的编号,最小字典序个数,最大字典序编号,最大字典序个数求有几个这样的字符串直接Kmp求得next数组就ok了,然后

2016-05-11 15:14:48 484

原创 CodeForces 629D Babaei and Birthday Cake(树状数组+离散化)

http://codeforces.com/contest/629/problem/D题意:将第i个蛋糕放在第j个蛋糕上(i>j && v[i]>v[j]),求最大的体积是多少思路:树状数组查询第i个蛋糕前的最大体积,需要离散化#include #include #include #include #include using namespace std;#de

2016-05-11 10:52:16 406

原创 CodeForces 615B Longtail Hedgehog(dp)

http://codeforces.com/contest/615/problem/Bn个点,m条无向边,在连成的链中找一条递增的链,使得末尾节点的度数乘以深度最大,因为是无向边,又要求递增的链,所以尽量使小的数做起点,并且将所有的边按照节点大小进行排序,从最小的点开始遍历,记录每一个点最大的深度,然后找到最大的乘积注意:最后的乘积用long long#include #incl

2016-05-10 10:44:06 297

原创 UVALive 6609 Minimal Subarray Length(最大子段)

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4620区间左右更新#include #include #include #include #include #include #include #include usi

2016-05-09 13:58:50 580

原创 CQUoj 威尼斯平底渔船 (强连通)

http://acm.cqu.edu.cn/oj/problem_show.php?pid=21461建图,判断该图中是否有回路(即强连通),有则输出“Yes”,否则“No”;#include #include #include #include #include #include #include #include using namespace std;#de

2016-05-08 10:31:20 861

原创 CodeForces 670D2 Magic Powder - 2(二分+贪心)

http://codeforces.com/contest/670/problem/D2简单的二分,二分所有可以做的饼干数,然后遍历就可以啦#include #include #include #include #include #include using namespace std;typedef long long LL;#define N 210000#defi

2016-05-07 12:35:20 605

原创 CodeForces 641C Little Artem and Dance (模拟)

http://codeforces.com/problemset/problem/641/C题意:有n个男生和n个女生,各自形成一个环,刚开始时男女编号从1-n一一对应,之后有q次操作1:x,如果x为正数,将所有男生按顺时针移动x位,若x为负,将所有男生按逆时针移动abs(x)位;2:将1号2号男生调换....i号和i+1号男生调换,n-1号和n号男生调换思路:用两个变量odd,e

2016-05-06 10:07:57 637

原创 hdu 1711 Number Sequence (kmp)

http://acm.hdu.edu.cn/showproblem.php?pid=1711kmp模板#include #include #include #include #include #include using namespace std;typedef long long LL;#define N 1100000#define INF 0x3f3f3f3f

2016-05-05 16:29:36 446

原创 CodeForces 659E New Reform (DFS)

http://codeforces.com/contest/659/problem/E题意:n个点中存在m条无向边,如果在这m条边加上方向,方向唯一,但是可以是任意的,求入度为0的点的个数最多是多少思路:循环搜索每一个点,如果存在环,则环内的点入度都不为0,环外的点如果能由环内的点到达,则入度不为0#include #include #include #include #i

2016-05-05 15:54:17 603 2

原创 CodeForces 604B More Cowbell

http://codeforces.com/problemset/problem/604/B题意:n个数字,k个盒子,把n个数放入k个盒子中,每个盒子最多只能放两个数字,问盒子容量的最小值是多少(水题)#include #include #include #include #include #include #include #include using names

2016-05-04 11:43:46 514

原创 FZU 2236 第十四个目标 (线段树)

http://acm.fzu.edu.cn/problem.php?pid=2236思路:每次找到当前第i个数之前有多少个比第i个数小的数,将前边的情况累加起来并且加上1线段树查找,离散化#include #include #include #include #include #include #include #include using namespace std;

2016-05-03 16:37:46 702

mysql-connector-java-8.0.13.jar.zip

mysql-connector-java-8.0.13.jar.zip

2021-03-09

JDBCTemplate相关依赖下载.zip

com.springsource.net.sf.cglib-2.2.0.jar com.springsource.org.aopalliance-1.0.0.jar com.springsource.org.aspectj.weaver-1.6.6.release.jar commons-logging-1.2.jar druid-1.0.9.jar mysql-connector-java-5.1.7-bin.jar spring-aop-5.3.4.jar spring-aspects-5.3.4.jar spring-beans-5.3.4.jar spring-context-5.3.4.jar spring-core-5.3.4.jar spring-expression-5.3.4.jar spring-jdbc-5.3.4.jar spring-orm-5.3.4.jar spring-tx-5.3.4.jar

2021-03-09

Spring5,AOP相关jar包.zip

com.springsource.net.sf.cglib-2.2.0.jar com.springsource.org.aopalliance-1.0.0.jar com.springsource.org.aspectj.weaver-1.6.6.release.jar commons-logging-1.2.jar druid-1.0.9.jar spring-aop-5.3.4.jar spring-aspects-5.3.4.jar spring-beans-5.3.4.jar spring-context-5.3.4.jar spring-core-5.3.4.jar spring-expression-5.3.4.jar

2021-03-08

黑盒测试用例设计方法

2016-08-09

二分图匹配

设G是一个图。如果存在VG的一个划分X,Y,使得G的任何一条边的一个端点在X中,另一个端点在Y中,则称G为二分图,记作G=(X,Y,E)。如果G中X的每个顶点都与Y的每个顶点相邻,则称G为完全二分图。

2015-08-08

空空如也

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

TA关注的人

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