码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
扩展欧几里得模板
1 LL Ex_GCD(LL a,LL b,LL &x,LL& y) 2 { 3 if(b==0) 4 { 5 x=1; 6 y=0; 7 return a; 8 } 9 LL g=Ex_GCD(b,a%b,x,y);...
分类:其他好文   时间:2014-07-19 17:04:57    阅读次数:249
HDU4542 小明系列故事——未知剩余系
大赞的数论题;大致思路: 对于TYPE=1的情况,认为 X 中有 X-K个约数,求最小的X,X-K>0 那么化为B+K的约数为B, 我们知道(B+K)的约数#include#include#includetypedef long long ll;using namespa...
分类:其他好文   时间:2014-07-19 16:03:52    阅读次数:230
NYOJ 82 迷宫寻宝(一)
迷宫寻宝(一)时间限制:1000ms | 内存限制:65535KB难度:4描述一个叫ACM的寻宝者找到了一个藏宝图,它根据藏宝图找到了一个迷宫,这是一个很特别的迷宫,迷宫里有N个编过号的门(N 2 #include 3 #include 4 #define LL long long 5 usin.....
分类:其他好文   时间:2014-07-19 11:29:24    阅读次数:189
BZOJ 1008 越狱 (组合数学)
题解:正难则反,从总数中减去全部相邻不相同的数目就是答案,n*(n-1)^(m-1):第一个房间有n中染色方案,剩下m-1个房间均只有n-1种染色方案,用总数减就是答案。#include const int mod=100003; typedef long long LL; LL n,m; LL p...
分类:其他好文   时间:2014-07-18 20:20:40    阅读次数:212
get or give
what you get/want reflects who you were.what you concern or give decides who you'll be.
分类:其他好文   时间:2014-07-18 20:10:12    阅读次数:211
LA 4384
扩展欧几里得#include#include#include#include#define maxn 3000009#define ll long longusing namespace std;void gcd(ll a,ll b,ll& d,ll& x,ll &y){ if(!b){d=a...
分类:其他好文   时间:2014-07-18 19:39:25    阅读次数:312
UVALive 3977
直接搜索,简单题;#include#include#include#include#include#define maxn 505#define ll long longusing namespace std;int map[maxn][maxn];int dir[4][2]={{0,1},{1,0...
分类:其他好文   时间:2014-07-18 17:05:58    阅读次数:208
UVA - 12232 Exclusive-OR (并查集扩展偏离向量)
Description You are not given n non-negative integers X0, X1,..., Xn-1 less than 220, but they do exist, and their values never change. I'll gradually provide you some facts about them, and as...
分类:其他好文   时间:2014-07-18 13:35:47    阅读次数:458
常用linux 命令和.bashrc
alias ll='ls -alF'一:ls -a --all : do not ignore entries starting with . -A , --almost-all : do not list implied . and .. -l : use a long listing f...
分类:系统相关   时间:2014-07-18 10:36:44    阅读次数:314
sublime搜索和替换--正则
Search and Replace Sublime Text features two main types of search: Search - Single FileSearch - Multiple Files We’ll examine them in turn, but first let’s talk about a powerful tool for searc...
分类:其他好文   时间:2014-07-16 16:18:52    阅读次数:312
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!