题意:N个人,每个人AC的题数都不一样。Eddy想从中选出一部分人(或者全部)分成两组。必须满足第一组中的最小AC数大于第二组中的最大AC数。问共有多少种不同的选择方案。思路:简单数学。。代码:ll C(int n,int x){ ll ans=1; rep(i,1,x){ ...
分类:
其他好文 时间:
2015-01-16 23:48:07
阅读次数:
145
题意:N*3的教室,有2种砖,2*2、1*1。问铺设教室的方案有多少种。(要铺满)思路:画一下图可以很快发现递推公式代码:int main(){ int a[35]; mem(a,0); a[1]=1, a[2] = 3; rep(i,3,30){ a[i] =...
分类:
其他好文 时间:
2015-01-16 23:41:54
阅读次数:
229
命令
:%s/pattern//gn
参数说明
% - 操作区间,全文本;可以使用1, $或行区间替代
s - substitute
pattern - 查询字符串
// - 无替代文本。如果偏好,中间可以加任意字符!建议添加‘~’,重复上次查询
g - Replace all occurrences in the line. Without this argument, rep...
分类:
系统相关 时间:
2015-01-16 19:19:23
阅读次数:
457
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2015-01-14 00:43:38
阅读次数:
166
一、函数 函数与存储过程相似,也是数据库中存储的已命名PL-SQL程序块。函数的主要特征是它必须有一个返回值。通过return来指定函数的返回类型。在函数的任何地方可以通过return expression语句从函数返回,返回类型必须和声明的返回类型一致。 语法: create [or rep...
分类:
数据库 时间:
2015-01-13 13:57:54
阅读次数:
150
今天碰到一个问题, 在使用CKEditor,进行AJAX提交的时候,如果包含单引号,则内容提交不到后端.
经过搜索,得到以下解决方案
前端JS代码(使用了CKEditor):
var strContent = encodeURI(CKEDITOR.instances.txtContent.getData()).replace(/'/g, "'").rep...
分类:
Web程序 时间:
2015-01-09 19:26:04
阅读次数:
206
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2015-01-08 00:45:25
阅读次数:
257
importscala.util.parsing.combinator.JavaTokenParsers
objectParserCombinatorextendsJavaTokenParsers{
defmain(args:Array[String]){
valmultiply:Parser[Double]=floatingPointNumber~rep(
("*"|"/")~floatingPointNumber^^{
case"*"~(factor:String)=>left:Double=&..
分类:
其他好文 时间:
2015-01-07 19:17:38
阅读次数:
146
DBCC CHECKDB 用法详解, 手工修复数据库1. 快速修复DBCC CHECKDB ('数据库名',REPAIR_FAST)2.重建索引并修复DBCC CHECKDB ('数据库名',REPAIR_REBUILD)3.如果必要允许丢失数据库修复DBCC CHECKDB ('数据库名',REP...
分类:
数据库 时间:
2015-01-07 13:04:38
阅读次数:
220
状压DP 我写的太水了……64ms才过,估计还有更好的做法,希望各位神犇不吝赐教>_12 #include13 #include14 #include15 #include16 #define rep(i,n) for(int i=0;i=n;--i)19 using namespace std;....
分类:
其他好文 时间:
2015-01-05 21:53:07
阅读次数:
224