码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
POJ 2249
简单求组合数,直接运用公式。注意C(n,k)=C(n,n-k)。#include #include #include #define LL __int64using namespace std;LL myc(LL n, LL r){ LL sum=1; for(LL i=1;in-r?n-r:r; ...
分类:其他好文   时间:2014-09-27 11:20:19    阅读次数:137
hdu 1428 漫步校园 (最短路+记忆化搜索)
漫步校园 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3023    Accepted Submission(s): 917 Problem Description LL最近沉迷于AC不能自拔,每天寝室、机房两...
分类:其他好文   时间:2014-09-26 22:13:39    阅读次数:186
Linux特殊权限分析(第二版)
SetUID[权限值=4]问题:为什么普通用户可以修改自己的密码?ll $(which passwd) 1、SetUID:当一个可执行程序/命令具有SetUID 权限,用户执行这个程序时,将以这个程序的所有者的身份执行。 2、加SetUID权限: chmod u+s [filename] 或 chmod 4755 [filename] #SetUID权限值=4  E.g. chmod u+s $(...
分类:系统相关   时间:2014-09-26 20:12:08    阅读次数:300
Linux安装Tools
[root@localhost~]#mkdir/media/cdrom(首先创建一个新的目录)[root@localhost~]#mount/dev/cdrom/media/cdrom(挂载到新建目录中)mount:blockdevice/dev/sr0iswrite-protected,mountingread-only[root@localhostcdrom]#ll/tmp(查看tmp下所有文件)[root@localhostcdrom]#cd..
分类:系统相关   时间:2014-09-26 19:54:19    阅读次数:222
Java格式化输出
Java的格式化输出等同于String.Format,与C有很大的相似,比如 System.out.printf("%8.2f", x);在printf中,可以使用多个参数,例如: System.out.printf("Hello, %s. Next year, you'll b...
分类:编程语言   时间:2014-09-26 19:04:08    阅读次数:296
cdq分治
第一次遇到这种神奇的东西 hdu4742 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define eps 1e-8 #define...
分类:其他好文   时间:2014-09-26 01:46:48    阅读次数:205
BASH漏洞需要补
一、使用yum-downloadonly插件yuminstallyum-downloadonly-y二、yumupdatebash--downloadonly--downloaddir=/var#就会自动把对应系统的bash版本下载到目录/var下。ll/var/bash-4.1.2-15.el6_5.1.x86_64.rpmscpbash-4.1.2-15.el6_5.1.x86_64.rpm到版本一样的其他机器上去三、在..
分类:其他好文   时间:2014-09-26 01:23:38    阅读次数:222
HDU 4801 Pocket Cube
题目链接去年现场,虎哥1Y的,现在刷刷题,找找状态...一共6种转法,把3个面放到顶部,左旋和右旋,感觉写的还不错....都写成常数了。#include #include #include #include #include #define LL long longusing namespace s...
分类:其他好文   时间:2014-09-26 00:34:37    阅读次数:316
POJ 3468.A Simple Problem with Integers 解题报告
用树状数组和线段树会比较简单,这里用这道题来学习Splay。第一次写,代码比较丑/* 初始化添加一个key值足够大的结点 保证每个需要的结点都有后继*/#include #include #define ll long longusing namespace std;cons...
分类:其他好文   时间:2014-09-25 23:21:08    阅读次数:170
poj 1286&&poj2409 Polya计数 颜色匹配
#include #include using namespace std;#define LL long longLL gcd(LL a, LL b){ return b ? gcd(b, a % b) : a;}LL polya(LL n){ LL ret = 0; for(L...
分类:其他好文   时间:2014-09-25 21:29:07    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!