码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
ZOJ 3816 Generalized Palindromic Number dfs+暴力枚举
题目链接:点击打开链接 题意: 给定一个数n 找一个最大的数u使得u 枚举前面有多少位是一样的。然后分类讨论。啪啦啪啦 #include #include #include #include #include using namespace std; typedef long long ll; const int N = 22; int pie[N], piesize; ll ...
分类:其他好文   时间:2014-09-07 19:52:35    阅读次数:252
csu 1320 (数论)
卡特兰数的应用#include#include#include#define ll long long#define mod 1000000007using namespace std;ll a[10000+10];int main(){ int n; int i,j; a[0]=...
分类:其他好文   时间:2014-09-07 19:47:25    阅读次数:165
Mudangjiang Online H Generalized Palindromic Number
一开始觉得是数位DP,后来想不出来。 但是感觉爆搜+剪枝可以过,于是就过了。。#include #include #include using namespace std;typedef long long LL;const int maxn = 50;int lim[maxn], len;LL n...
分类:其他好文   时间:2014-09-07 18:32:55    阅读次数:177
SRM631 Div2 1000 ???
保存代码,题解待更新。。。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define LL long long 8 9 class TaroCoins{10 public:11 l...
分类:其他好文   时间:2014-09-07 01:00:14    阅读次数:144
HDU 4228
很明显可以转化为反素数的题目。由于有n种不同的方式,所以,数的约数可以为2*n或者2*n-1#include #include #include #define LL __int64using namespace std;LL p[16]={2,3,5,7,11,13,17,19,23,29,31,...
分类:其他好文   时间:2014-09-06 21:13:13    阅读次数:298
HDU 2138
这题用MILLER测试应该是不可避免的。#include #include #include #include #define LL __int64using namespace std;LL random(LL n){ return (LL)((double)rand()/RAND_MAX*n+0...
分类:其他好文   时间:2014-09-06 10:53:13    阅读次数:165
POJ 3641
主要是为了试一下MILLER-RABIN的方法#include #include #include #include #define LL __int64using namespace std;const LL TIME=1000;LL random(LL n){ return (LL)((doub...
分类:其他好文   时间:2014-09-06 09:45:02    阅读次数:176
Codeforces 113B Petr# 字符串hash
题目链接:点击打开链接 #include #include #include #include using namespace std; typedef unsigned long long ll; const int key = 1e9 + 7; const int N = 2000 + 2; ll xp[N], h[N]; char a[N], b[N], c[N]; int...
分类:其他好文   时间:2014-09-05 18:18:01    阅读次数:230
CodeForces 112D Petya and Divisors 模拟题(水
题目链接:点击打开链接 论科学暴力的姿势重要性。。 #include #include #include #include #include #include #include #include using namespace std; #define ll int #define N 100010 #define M 100010 vectorG[N], g...
分类:其他好文   时间:2014-09-05 16:09:51    阅读次数:210
HDU 1058 Humble Numbers (打表)
题目链接:HDU 1058 Humble Numbers 题意:一些数他们的素数因子只有2,3,5,7。求这些数。 因为这些数的因子只可能是2,3,5,7。所以通过2,3,5,7这个四个数构造这个数列,这个数列靠后的数必定是前面的数乘上2,3,5,7得到。 AC代码: #include #include #define ll __int64 using namesp...
分类:其他好文   时间:2014-09-05 14:26:41    阅读次数:103
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!