08 2018 档案
Factorials 阶乘
摘要:Description N的阶乘写作N!表示小于等于N的所有正整数的乘积。阶乘会很快的变大,如13!就必须用32位整数类型来存储,70!即使用浮点数也存不下了。你的任务是找到阶乘最后面的非零位。举个例子,5!=1*2*3*4*5=120所以5!的最后面的非零位是2,7!=1*2*3*4*5*6*7= 阅读全文
posted @ 2018-08-30 16:02 Baiyi_destroyer 阅读(197) 评论(0) 推荐(0)
Factorial(hdu 1124)
摘要:Description The most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this 阅读全文
posted @ 2018-08-30 15:55 Baiyi_destroyer 阅读(147) 评论(0) 推荐(0)
EXTENDED LIGHTS OUT
摘要:In an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5 buttons each). Each button 阅读全文
posted @ 2018-08-14 10:30 Baiyi_destroyer 阅读(193) 评论(0) 推荐(0)
C++中 string 的用法大全
摘要:之所以抛弃char*的字符串而选用C++标准程序库中的string类,是因为他和前者比较起来,不必 担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下(甚至是100%)的需要。我们可以用 = 进行赋值操作,== 进行比较,+ 做串联(是不是很简单?)。我们 阅读全文
posted @ 2018-08-10 10:16 Baiyi_destroyer 阅读(1126) 评论(0) 推荐(0)
Sonya and Robots(CodeForces 1004C)
摘要:Since Sonya is interested in robotics too, she decided to construct robots that will read and recognize numbers. Sonya has drawn nn numbers in a row,  阅读全文
posted @ 2018-08-10 09:45 Baiyi_destroyer 阅读(168) 评论(0) 推荐(0)
高斯消元模板
摘要:转自:传送门 阅读全文
posted @ 2018-08-09 11:08 Baiyi_destroyer 阅读(160) 评论(0) 推荐(0)
最小树形图——朱刘算法
摘要:一、相关定义 定义:设G = (V,E)是一个有向图,它具有下述性质: 最小树形图就是有向图G = (V, E)中以vi为根的树形图中权值和最小的那一个。 另一种说法:最小树形图,就是给有向带权图一个特殊的点root,求一棵以root为根节点的树使得该树的的总权值最小。 性质:最小树形图基于贪心和缩 阅读全文
posted @ 2018-08-08 14:51 Baiyi_destroyer 阅读(286) 评论(0) 推荐(0)
划分树详解及模板
摘要:转载自:传送门 数位DP其实是很灵活的,所以一定不要奢求一篇文章就会遍所有数位DP的题,这一篇只能是讲清楚一种情况,其他情况遇到再总结,在不断总结中慢慢体会这个思想,以后说不定就能达到一看到题目就能灵活运用的水平。(其实DP都是这样……) 这一篇要说的数位DP是一道最简单的数位DP:题目链接 题目大 阅读全文
posted @ 2018-08-07 23:38 Baiyi_destroyer 阅读(124) 评论(0) 推荐(0)
CodeForces - 1015 D.Walking Between Houses
摘要:Description Natasha is planning an expedition to Mars for nn people. One of the important tasks is to provide food for each participant. The warehouse 阅读全文
posted @ 2018-08-06 22:51 Baiyi_destroyer 阅读(161) 评论(0) 推荐(0)
LCA最近公共祖先模板代码
摘要:vector模拟邻接表: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<cmath> 5 #include<vector> 6 #include<queue> 7 #define eps 1e-8 8 # 阅读全文
posted @ 2018-08-03 17:17 Baiyi_destroyer 阅读(137) 评论(0) 推荐(0)
Nearest Common Ancestors (POJ 1330)
摘要:A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with 阅读全文
posted @ 2018-08-03 16:34 Baiyi_destroyer 阅读(129) 评论(0) 推荐(0)
数位dp讲解及模板
摘要:转载自:传送门 数位DP其实是很灵活的,所以一定不要奢求一篇文章就会遍所有数位DP的题,这一篇只能是讲清楚一种情况,其他情况遇到再总结,在不断总结中慢慢体会这个思想,以后说不定就能达到一看到题目就能灵活运用的水平。(其实DP都是这样……) 这一篇要说的数位DP是一道最简单的数位DP:题目链接 题目大 阅读全文
posted @ 2018-08-03 10:50 Baiyi_destroyer 阅读(219) 评论(0) 推荐(0)
hello world
摘要:welcome to my blog! 今天第一天入住博客园,以后会慢慢更新,蒟蒻一枚,求关照^_^。 挂上csdn链接:https://blog.csdn.net/baiyi_destroyer/article/list/1(常更) 阅读全文
posted @ 2018-08-02 14:40 Baiyi_destroyer 阅读(89) 评论(0) 推荐(0)