会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
LYL
Nothing is impossible
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
下一页
2019年1月25日
A - How Many Tables(并查集)
摘要: A - How Many Tables 实现1代码: 1 /***********************************************/ 2 #define set st 3 int set[1006]; 4 int n,m; 5 void join(int a,int b) 6
阅读全文
posted @ 2019-01-25 10:52 liuyongliu
阅读(303)
评论(0)
推荐(0)
2019年1月24日
计算三角形面积
摘要: 参考:已知三点坐标,求三角形面积 1: 已知直角坐标系3点p(a,b),m(c,d),n(e,f)求三角形pmn面积 两倍三角形面积是整型 代码模板: ll solve(ll a,ll b,ll c,ll d,ll e,ll f)//计算两倍三角形面积 { return abs(a*d+b*e+c*
阅读全文
posted @ 2019-01-24 21:36 liuyongliu
阅读(5080)
评论(0)
推荐(0)
STL之nth_element__寻找第n大的元素
摘要: 参考博客:STL nth_element神器 官方解释:http://www.cplusplus.com/reference/algorithm/nth_element/ nth_element(first,nth,last) 即寻找数组中由小到大排在第n的元素,放在第n个位置上(假设下标从1开始)
阅读全文
posted @ 2019-01-24 21:26 liuyongliu
阅读(408)
评论(0)
推荐(0)
处女座的测验(一)
摘要: 题目:处女座的测验(一) 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288KSpecial Judge, 64bit IO Format: %lld 题目描述 处女座进行了一场c语言的考试,要求很简单,输出2000个正整数,并且满足以下条件: 1.
阅读全文
posted @ 2019-01-24 20:12 liuyongliu
阅读(190)
评论(0)
推荐(0)
梅氏砝码问题
摘要: 梅氏砝码问题 例题 处女座的砝码 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld 题目描述 处女座热爱做物理实验,为了实验,处女座必须要精确的知道物品的质量。处女座准备自己设计一套砝码,每一个砝码都是正整
阅读全文
posted @ 2019-01-24 19:28 liuyongliu
阅读(640)
评论(0)
推荐(0)
高精度模板(综合篇)
摘要: 转:ACM-高精度模板(综合篇) 在这里,我们约定,能用int表示的数据视为单精度,否则为高精度。所有函数的设计均采用带返回值的形式。 本文包含 1.高精度加法 2.高精度减法 3.高精度乘法 1)高精度乘高精度的朴素算法 2)高精度乘高精度FFT优化算法 3)高精度乘单精度 4.高精度除法 1)高
阅读全文
posted @ 2019-01-24 17:25 liuyongliu
阅读(8442)
评论(3)
推荐(6)
2019年1月23日
组合数取模运算
摘要: 参考博客: 大数量级组合数的快速计算方法,log转化 组合数取模 组合数取模2 组合公式 c(n,m)=p(n,m)/m!=n!/((n-m)!*m!) c(n,m)=c(n,n-m) c(n,m)=c(n-1,m)+c(n-1,m-1) 欧拉定理 (< 自家博客) 欧拉定理,(也称费马-欧拉定理)
阅读全文
posted @ 2019-01-23 15:12 liuyongliu
阅读(1388)
评论(0)
推荐(0)
组合数计算(不爆 LL 时)
摘要: 参考:大数量级组合数的快速计算方法 ll C(int n,int m) { if(m>n) return 0; double sum=0; // ln( C(n,m) ) for(int i=m+1;i<=n;i++) sum+=log(i); for(int i=1;i<=n-m;i++) sum
阅读全文
posted @ 2019-01-23 13:43 liuyongliu
阅读(258)
评论(0)
推荐(0)
2019年1月22日
数组离散化模板
摘要: 代码: 对a数组离散化 void Discretization(int *a,int n) { int b[n+2]; for(int i=1;i<=n;i++) b[i]=a[i]; sort(b+1,b+n+1); int size=unique(b+1,b+n+1)-b-1;//size为离散
阅读全文
posted @ 2019-01-22 22:25 liuyongliu
阅读(301)
评论(0)
推荐(0)
KMP
摘要: MingSD's KMP
阅读全文
posted @ 2019-01-22 22:23 liuyongliu
阅读(98)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
下一页
公告