码迷,mamicode.com
首页 > 其他好文
POJ2975|Nim|博弈论
DescriptionNim is a 2-player game featuring several piles of stones. Players alternate turns, and on his/her turn, a player’s move consists of removin...
分类:其他好文   时间:2015-07-15 22:32:52    阅读次数:132
bzoj2154
#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#inclu...
分类:其他好文   时间:2015-07-15 22:32:31    阅读次数:107
zoj2112
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2112经典的动态区间第K大。用树状数组套线段树。对原数组建一个树状数组,每个树状数组的结点代表一个线段树,这个线段树以权值为下标,包括这个树状数组的结点包含的区间。插入的...
分类:其他好文   时间:2015-07-15 22:33:09    阅读次数:188
bzoj1151
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1151状压DP,枚举前面4个,使得环型变线型。#include#include#include#include#include#include#include#include#include#in...
分类:其他好文   时间:2015-07-15 22:31:48    阅读次数:189
CMarkup类在VC中的使用
首先到http://www.firstobject.com/dn_markup.htm上面下载CMarkup类,将CMarkup.cpp和CMarkup.h导入到我们的工程中就可以了。编译可能会出现问题,解决的方法是在CMarkup.cpp的开头加上#include ,或者关闭预编译也可以。1、创建...
分类:其他好文   时间:2015-07-15 22:32:23    阅读次数:185
Learn Prolog Now 翻译 - 第五章 - 数字运算 - 第一节,Prolog中的数字运算
内容提要Prolog中的数字运算Porlog运算的本质Prolog中的数字运算Prolog语言本身提供了一些基础的运算符号,对整数进行一些操作(即类似...-3, -2, -1, 0, 1, 2, 3等)。多数Prolog的实现同时也提供了一些工具对实数进行操作(比如浮点数,1.53,6.35,等等...
分类:其他好文   时间:2015-07-15 22:31:03    阅读次数:132
超炫15分钟超现实主义短片《Sundays》
分类:其他好文   时间:2015-07-15 22:31:31    阅读次数:107
大文件复制时进行实时保存
1 int main(int argc, const char * argv[]) { 2 @autoreleasepool { 3 4 5 //复制文件 6 7 8 //找到原来的文件...
分类:其他好文   时间:2015-07-15 22:32:16    阅读次数:108
设计模式之迭代器模式
迭代器模式提供一种方法顺序访问一个聚合对象中的各个元素,而不暴露该对象的内部表示Iteratorpackage com.hml.iterator;public interface Iterator { public Object first(); public Object ne...
分类:其他好文   时间:2015-07-15 22:30:38    阅读次数:138
struts.enable.DynamicMethodInvocation = true 动态方法调用
default.properties在Struts 2的核心jar包-struts2-core中,有一个default.properties的默认配置文件。里面配置了一些全局的信息,比如:struts.enable.DynamicMethodInvocation = true,-动态方法调用,为tr...
分类:其他好文   时间:2015-07-15 22:28:27    阅读次数:95
Beanutils基本用法
http://www.blogjava.net/shiwenfeng/archive/2009/12/30/307731.htmlBeanutils用了魔术般的反射技术,实现了很多夸张有用的功能,都是C/C++时代不敢想的。无论谁的项目,始终一天都会用得上它。我算是后知后觉了,第一回看到它的时候居然...
分类:其他好文   时间:2015-07-15 22:29:38    阅读次数:117
bzoj1146
这道题和bzoj2588很像,是动态区间第K大的变形。先求DFS序,一棵子树的DFS是连续的,不妨记为[l,r],我们维护前缀和,在l处+1,在r+1处-1。变成动态区间第K大的经典问题,用树状数组套线段树。#include#include#include#include#include#inclu...
分类:其他好文   时间:2015-07-15 22:30:45    阅读次数:166
LeetCode#231 Power of Two
Problem Definition: Given an integer, write a function to determine if it is a power of two.Solution:class Solution: # @param {integer} n # @re...
分类:其他好文   时间:2015-07-15 22:27:51    阅读次数:90
struct stat结构体的详解和用法
[cpp]view plaincopy//!需要包含de头文件#include#includeintstat(constchar*filename,structstat*buf);//!prototype,原型structstat{dev_tst_dev;/*IDofdevicecontaining...
分类:其他好文   时间:2015-07-15 22:30:09    阅读次数:170
struts中如何将前台的值能在action中获取到
如何获取值----三种方式(属性驱动,对象驱动,模型驱动)A:属性驱动必须生成get,set方法B:对象驱动给对象也必须生成get,set方法c模型驱动模型驱动需要action去实现一个ModelDrvien(),并且重写一个getModel()方法
分类:其他好文   时间:2015-07-15 22:29:41    阅读次数:111
CustomTabBarViewController
// AppDelegate.m// CustomTabBar//// Created by qianfeng on 15/7/9.// Copyright (c) 2015年 qianfeng. All rights reserved.//#import "AppDelegate.h"#i...
分类:其他好文   时间:2015-07-15 22:28:30    阅读次数:102
分析函数改写自关联
数据库环境:SQL SERVER 2005我们会看到这样的需求,查询部门的员工信息和对应的部门人数,要求在同一行上展示。在没有分析函数之前,遇到需求,只能通过员工表自关联来实现。我这里就有一个类似的例子SELECT COUNT(*) FROM dmrpout_03 LEFT JOI...
分类:其他好文   时间:2015-07-15 22:28:37    阅读次数:114
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!