码迷,mamicode.com
首页 > 其他好文
light oj 1248 - Dice (III)(期望)
Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means when you throw the dic...
分类:其他好文   时间:2015-05-01 12:08:28    阅读次数:141
第二届山东省ACM省赛回顾 Crack Mathmen(打表)
Crack Mathmen 题目链接:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2165 Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Since mathmen take security very ...
分类:其他好文   时间:2015-05-01 12:08:35    阅读次数:167
poj1459,网络流,最大流,多源点多汇点
题意: 给几个发电站,给几个消耗站,再给几个转发点。 发电站只发电,消耗站只消耗电,转发点只是转发电,再给各个传送线的传电能力。 问你消耗站能获得的最多电是多少。 思路:增加一个超级源点,和超级汇点。。把所给的发电站都和超级源点相连,把所给的消耗战都和超级汇点相连。。用EK求最大流。 模板有几个地方要注意。 1:start是编号最前的点,last是编号最后的点 ...
分类:其他好文   时间:2015-05-01 12:07:35    阅读次数:217
YTUOJ-占座问题(2道)
题目描述 Tree经过不懈奋斗,终于上了烟台大学,开始体验美好的大学生活,早晨去上个高数课吧,进到教室发现,全是书啊(占座的),不得不在后面坐着上课,Tree不服气啊,第二次课早早的来到教室准备占座,占座也是有规矩的:首先别人占的座位,你不能去占;其次,连着的空座,无论连着多少个空座都可以只用一本书去占,Tree不知道最少用几本书可以占完这一排的空座,只好请你来帮忙计算一下啦。 输...
分类:其他好文   时间:2015-05-01 12:07:24    阅读次数:134
机房收费——配置文件
敲完了三层,好不容易适应了一个模式,就又改了七层,带着三层的习惯,伴着七层的热情,我就开始敲啊。 那么, 问题来了,三层时我的数据库连接,写在D层,那么我七层怎么办,总不能个个写吧? 想不通就问吧,可能大家都比较忙,人爱搭不惜理的说:该配置文件啊。 啊,配置文件,这是嘛?咱不知道啊!可脸皮薄也不好意思问,就差把。 配置文件是什么? 用户配置文件就是在用户登录电脑时,或是用户在使用软件时,...
分类:其他好文   时间:2015-05-01 12:06:41    阅读次数:147
light oj 1265 - Island of Survival(概率dp)
1265 - Island of Survival PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You are in a reality show, and the show is way too real t...
分类:其他好文   时间:2015-05-01 12:08:02    阅读次数:542
cf 301 div2
A - Combination Lock 题目大意:给有n个(0-9)环圈密码锁,数串 s1->s2最少移动次数; 题目分析: 简单模拟; 代码: const int N=100007; char s1[N],s2[N]; int main() { int n; while(scanf("%d",&n)==1) { int ans=0; ...
分类:其他好文   时间:2015-05-01 12:07:42    阅读次数:185
poj逗比了...
首先,这是一个TextArea的bug,真的似乎是一个bug只需要在poj1459中提交如下代码,就会发现,,,它其实提交不了…#include #include #include #include #include #include #include using na...
分类:其他好文   时间:2015-05-01 12:05:30    阅读次数:141
LeetCode Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 题意:求树的高度。 思路:就是递归。 /** * Definiti...
分类:其他好文   时间:2015-05-01 12:06:48    阅读次数:163
poj3061---Subsequence
Subsequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9358   Accepted: 3767 Description A sequence of N positive integers (10 < N < 100 000), each of t...
分类:其他好文   时间:2015-05-01 12:04:56    阅读次数:102
alter table新增字段操作究竟有何影响?(上篇)
很久以前就有个疑问,见过一些表设计时会留出几个reverse的字段,目的是为了以后扩展,但此时设计的字段类型、长度等都是预计的,未来是否可用,不好说,那为什么会这么做呢?可能的原因是:“我现在设定好字段,需要的时候直接用就行了,不需要新增字段的操作”。那么,问题就是,新增字段的操作究竟有什么影响?增加表字段的时候,是否会锁表?对DML、DDL有什么影响?如果搞清楚这些,才能对上面的问题给出科学的答...
分类:其他好文   时间:2015-05-01 12:07:16    阅读次数:196
bower_home用法
bower home功能:在系统默认浏览器中打开包的github主页用法一:不指定包名dulin@IT01010030921 /e/website/jquery-plugins/bower_components/mockjs (master) $ bower home说明:不指定包名的用法需要将目录切换到该包所在的根目录下用法二:指定包名,在哪个目录无所谓dulin@IT01010030921 /e...
分类:其他好文   时间:2015-05-01 12:06:55    阅读次数:125
Pseudoprime numbers(POJ-3641)(快速幂)
快速幂+素数判断 p必须不是素数。 #include #include #include #include #include #include #include using namespace std; typedef long long ll; ll a,p; ll mod_pow(ll x,ll n,ll mod) { ll res = 1; while(n>0) { ...
分类:其他好文   时间:2015-05-01 12:05:55    阅读次数:151
EasyUI datagrid toolbar常用的两种形式
第一种   $(function(){ $('#userInfo').datagrid({        url:'../json/customerAction_getCustomerInfo',     fitColumns:true,     striped:true,     nowrap:true,     loadMsg:'数据正在加载,请稍后...',    ...
分类:其他好文   时间:2015-05-01 12:06:34    阅读次数:386
完全搞懂傅里叶变换和小波(5)——傅立叶级数展开之函数项级数的概念
之前我们在介绍泰勒展开式的时候提到过傅立叶级数。利用傅立叶级数对函数进行展开相比于泰勒展开式,会具有更好的整体逼近性,而且对函数的光滑性也不再有苛刻的要求。傅立叶级数是傅立叶变换的基础,傅立叶变换是数字信号处理(特别是图像处理)中非常重要的一种手段。遗憾的是,很多人读者并不能较为轻松地将傅立叶变换同高等数学中讲到的傅立叶级数联系起来。本节我们就来解开读者心中的疑惑。...
分类:其他好文   时间:2015-05-01 12:04:06    阅读次数:247
杭电 HDU ACM Strange fuction
Strange fuction Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4124    Accepted Submission(s): 2964 Problem Description Now, here is a...
分类:其他好文   时间:2015-05-01 12:05:13    阅读次数:115
bower_info用法
bower info功能:查看包信息用法一: 指定包名dulin@IT01010030921 /e/website/jquery-plugins (master) $ bower info jquery bower jquery#* cached git://github.com/jquery/jquery.git#2.1.4 bower jquery#*...
分类:其他好文   时间:2015-05-01 12:04:13    阅读次数:129
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!