码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
hdu4961 Boring Sum
#include #include #include #include #include #include #include #include #include #include #define inf 0x3f3f3f3f #pragma comment(linker, "/STACK:16777216") #define eps 1e-6 #define ll long l...
分类:其他好文   时间:2014-08-20 21:14:02    阅读次数:248
catalan卡特兰数
catalan卡特兰数:卡塔兰数是组合数学中一个常出现在各种计数问题中出现的数例。由比利时的数学家欧仁·查理·卡塔兰(1814-1894)命名。卡塔兰数的一般公式为 C(2n,n)/(n+1)。 一般计算式为(递归):h(n)=(4n-2)/(n+1)*h(n-1)  (n>1),h(0)=1。 计算单个catalan程序: ll catalan(int n) { if(n==0...
分类:其他好文   时间:2014-08-20 21:13:23    阅读次数:350
sgu To xor or not to xor
题意:从n个数中,选择一些数,使得异或最大。 1 #include 2 #include 3 #include 4 #define ll __int64 5 using namespace std; 6 7 ll c[110][110]; 8 int n; 9 ll cc;10 11 voi...
分类:其他好文   时间:2014-08-20 19:27:02    阅读次数:253
2014多校联合-第八场
1001:2048 很明显,一开始看错题了。。。sad 这题目我感觉挺卡时间的。。。 dp[i][j]:在选择2^i的时候,选择的和为j*2^i到(j+1)*2^i-1时候的情况。 #include #include #include #include #include #include #include #include using namespace std; #define LL ...
分类:其他好文   时间:2014-08-20 16:26:32    阅读次数:169
HDU 1800 Flying to the Mars
可能是数据水吧看到网上的代码都是什么map函数的 但是直接一水而过了#include#include#include#include#include#include#include#define mem(a,b) memset(a,b,sizeof(a))#define ll __int64#def...
分类:其他好文   时间:2014-08-20 02:31:15    阅读次数:246
POJ 3624 Charm Bracelet
01 背包做过好几次了吧#include#include#include#include#include#include#include#define mem(a,b) memset(a,b,sizeof(a))#define ll __int64#define MAXN 1000#define I...
分类:其他好文   时间:2014-08-20 02:30:45    阅读次数:180
AVL树----java
AVL树----java AVL树是高度平衡的二叉查找树 1.单旋转LL旋转 理解记忆:1.在不平衡的节点的左孩子的左孩子插入导致的不平衡,所以叫LL private AVLTreeNode leftLeftRotation(AVLTreeNode k2) { AVLTreeNode k1; k1 = k2.left; k2.left = k1.right...
分类:编程语言   时间:2014-08-20 01:24:31    阅读次数:223
HDU 4969 Just a Joke(积分)
HDU 4969 Just a Joke 题目链接 推公式,r′=dr/dt=vy=v22?v12r2/R2????????????√,可得积分公式为 ∫R0y=1/v22?v12x2/R2?????????????√,利用三角换元去化简即可 代码: #include #include #include typedef long long ll; int t; ...
分类:其他好文   时间:2014-08-20 00:06:05    阅读次数:321
HDU 4960 Another OCD Patient 区间dp
区间dp。。 T^T一直感觉是n^3,看了题解看来是数据水了么。。 #pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #define ll long long #define inf 1e8 inline int min(int a, int b){return a<b?a:b;}...
分类:其他好文   时间:2014-08-19 20:57:15    阅读次数:213
Miller_Rabin大素数测试与Pollard_rho整数分解模版
#include #include #include #include using namespace std; typedef __int64 LL; const int Times = 20; LL factor[100], l; LL gcd(LL a, LL b) { return b ? gcd(b, a%b):a; } LL add_mod(LL a, LL b, LL n)...
分类:其他好文   时间:2014-08-19 20:57:05    阅读次数:254
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!