自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 scanf的一些技巧

一、scanf和gets1.不同点:  char string[50];  scanf("%s",string); //当遇到回车,空格和tab键会自动在字符串后面添加'\0',但是不能接受回车,空格和tab键,他们仍会留在输入的缓冲区中。  gets(string); //遇到回车认为输入结束,并用'\n'替代 '\0'.回车键不会留在输入缓冲区中2.相同点:...

2015-12-18 13:19:00 123

转载 【CodeForces 602C】H - Approximating a Constant Range(dijk)

DescriptionIn Absurdistan, there arentowns (numbered1throughn) andmbidirectional railways. There is also an absurdly simple road network — for each pair of different townsxandy, t...

2015-12-15 00:26:00 65

转载 【CodeForces 602B】G - 一般水的题2-Approximating a Constant Range

DescriptionWhen Xellos was doing a practice course in university, he once had to measure the intensity of an effect that slowly approached equilibrium. A good way to determine the equili...

2015-12-15 00:19:00 131

转载 【CodeForces 604B】F - 一般水的题1-More Cowbe

DescriptionKevin Sun wants to move his precious collection ofncowbells from Naperthrill to Exeter, where there is actually grass instead of corn. Before moving, he must pack his cowbells ...

2015-12-14 15:18:00 110

转载 【CodeForces 596A】E - 特别水的题5-Wilbur and Swimming Pool

DescriptionAfter making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sid...

2015-12-14 15:12:00 109

转载 【CodeForces 599A】D - 特别水的题4- Patrick and Shopping

DescriptionToday Patrick waits for a visit from his friend Spongebob. To prepare for the visit, Patrick needs to buy some goodies in two stores located near his house. There is ad1meter l...

2015-12-14 15:07:00 115

转载 【CodeForces 602A】C - 特别水的题3-Two Bases

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102271#problem/CDescriptionAfter seeing the "ALL YOUR BASE ARE BELONG TO US" meme for the first time, numbersXandYrealised that t...

2015-12-14 14:58:00 903

转载 【 CodeForces 604A】B - 特别水的题2-Uncowed Forces

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102271#problem/BDescriptionKevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and feat...

2015-12-14 14:48:00 95

转载 【CodeForces 606A】A -特别水的题1-Magic Spheres

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102271#problem/ADescriptionCarl is a beginner magician. He hasablue,bviolet andcorange magic spheres. In one move he can transf...

2015-12-14 14:23:00 83

转载 快速幂算法

快速幂算法思想:迭代/二进制我们知道一个公式:a*b%c=(a%c*b%c)%c如果要求ab%c:一、迭代  当b为奇数:ab%c=((a2)b/2*a)%c,记k=a2%c,那就是求(kb/2%c*a)%c  当b为偶数:ab%c=(a2)b/2%c,记k=a2%c,那就是求kb/2%c  然后问题转化为求kb/2%c,  我们假设令k1=a2%c,问题...

2015-12-13 11:09:00 58

转载 模式匹配KMP算法

关于KMP算法的原理网上有很详细的解释,我试着总结理解一下:KMP算法是什么  以这张图片为例子    匹配到j=5时失效了,BF算法里我们会使i=1,j=0,再看s的第i位开始能不能匹配,而KMP算法接下来就去比较T[2](next[5]=2)和S[5]next数组什么意思?就是当t[i]不匹配时,就让i=next[i]再去比较,则t[next[...

2015-12-03 22:35:00 73

转载 【codevs1044】导弹拦截问题与Dilworth定理

题目描述 Description 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。输入描述 Input Description输入导弹依次飞来的高度(雷...

2015-12-01 14:15:00 141

空空如也

空空如也

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

TA关注的人

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