先选人,再从这些人里选一个队长,方案总数:C(i,1)*C(n,i)(其中i从1到n)的总和。这个公式显然不能在时限内暴力算出来,需要变形和推导出更简单的来。用到组合数里面这个公式:C(n,k)*C(k,r)=C(n,r)*C(n-r,k-r)(其中r#include#include#include...
分类:
其他好文 时间:
2014-08-30 01:16:18
阅读次数:
239
背景: 出现cpu高于常规的告警排查: 1.开跟踪,没有发现cup特别高的查询 2.查看内核cpu使用量,看是否是sql server 端引起 3.查看负荷,是否负荷特别高这里使用 batch request 4.全部无解,sql运行都正常,在thread,worker,task级别查看也...
分类:
其他好文 时间:
2014-08-30 01:15:58
阅读次数:
247
Blog-WatchThem看看他们的BLog 心路历程 Writing&emspBlog,与Paper相比可能缺少权威性,与教科书相比缺乏系统性,但与它自己相比,最大特点是:讲人话,讲人能听懂的话。 向优秀的人学习,看那些传播知识的博客,如窗,发散开来。CSDN-zouxy09华南理工zouxy,...
分类:
其他好文 时间:
2014-08-30 01:15:48
阅读次数:
249
#include #include #include #include #define TRUE 1#define FALSE 0#define ERROR 0#define INFEASIBLE -1typedef int Status;typedef int Boolean;typedef in...
分类:
其他好文 时间:
2014-08-30 01:15:28
阅读次数:
232
Problem DescriptionUnlike single maze, double maze requires a common sequence of commands to solve both mazes. See the figure below for a quick unders...
分类:
其他好文 时间:
2014-08-30 01:14:48
阅读次数:
329
#include #include #include #include #include #include #include #include #include #include #include #define max(x,y) ((x)>(y)?(x):(y))#define min(x,y) ...
分类:
其他好文 时间:
2014-08-30 01:14:39
阅读次数:
192
Junit&Jmock简介序言 21. 环境配置 22.一种比较好的命名方式 33. JUnit使用入门 43.1一种简单的实现 43.2添加初始化和销毁方法的实现 53.3对Java异常(Exception)的单元测试 83.4 Assert类 93.5小结 124.Jmock使用入门 124.1...
分类:
其他好文 时间:
2014-08-30 01:14:28
阅读次数:
500
1639: [Usaco2007 Mar]Monthly Expense 月度开支Time Limit:5 SecMemory Limit:64 MBSubmit:529Solved:269[Submit][Status]DescriptionFarmer John是一个令人惊讶的会计学天才,他已经...
分类:
其他好文 时间:
2014-08-30 01:13:58
阅读次数:
296
本文所使用的验证码识别的方法非常暴力,高手可忽略。对于在客户端实现的“伪验证码”或使用静态图片的验证码,本文不作讨论。对于验证码的识别,一直以为,只要足够的样本,就可以分析出验证码的特征,从而进行分门别类,再通过和样本做比较,就可以得出正确验证码。这里简单而暴力的验证一下这个一直想验证而没有行动.....
分类:
其他好文 时间:
2014-08-30 01:13:28
阅读次数:
341
1640: [Usaco2007 Nov]Best Cow Line 队列变换Time Limit:5 SecMemory Limit:64 MBSubmit:493Solved:253[Submit][Status]DescriptionFJ打算带着他可爱的N (1 ≤ N ≤ 2,000)头奶牛...
分类:
其他好文 时间:
2014-08-30 01:12:58
阅读次数:
317
大纲Testing 的第一个切入点:单元测试。本篇文章将针对单元测试进行简介,主要内容包含了5W:WhyWhatWhereWhoWhen而How 的部分,属于实现部分,将于下一篇文章介绍工具与简单的范例。最后会提到测试用例所代表的意义与其重要性。前言单元测试,是开发人员最该写的测试程序,却也是最容易...
分类:
其他好文 时间:
2014-08-30 01:12:48
阅读次数:
361
Arranging Your TeamTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1218Accepted Submission(s): 360...
分类:
其他好文 时间:
2014-08-30 01:12:28
阅读次数:
235
软件环境: OS:ubuntu-12.04-desktop-amd64 Redis:redis-2.8.13.tar.gz TCL:tcl8.6.2-src.tar.gz VMware:vmware workstation 10 OS:win 7-64 先安装操作系统,然后使用克隆功能克隆上4份: ...
分类:
其他好文 时间:
2014-08-30 01:11:48
阅读次数:
475
利用结构体编写的两人对战小游戏,代码及简要分析如下 1 public struct Fighter 2 { 3 public string name; 4 public int blood; 5 ...
分类:
其他好文 时间:
2014-08-30 01:11:18
阅读次数:
320
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-08-30 01:11:08
阅读次数:
286
Given an array where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for binary tree * public class TreeN...
分类:
其他好文 时间:
2014-08-30 01:10:48
阅读次数:
333
Methods and systems are provided to control the execution of a virtual machine (VM). A VM Monitor (VMM) accesses VM Control Structures (VMCS) indirect...
分类:
其他好文 时间:
2014-08-30 01:10:40
阅读次数:
383