var userF = new List(); User m1 = new User() { Id =
"0" }; userF.Add(m1); var us...
分类:
其他好文 时间:
2014-05-09 04:26:48
阅读次数:
280
ZOJ Problem Set - 3780
Paint the Grid Again
Time Limit: 2 Seconds Memory Limit: 65536 KB
Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black ...
分类:
其他好文 时间:
2014-05-09 02:00:35
阅读次数:
506
HDU 4578
线段树区间更新
操作有:
区间所有数add(c)
区间所有数mul(c)
区间所有数set(c)
查询有:
区间所有数的p次方和(p>= 1 && p
关键是区间更新的三种操作的优先级的确定清楚
关键是:down和update中对区间的更新操作是一回事,可以写成函数方便编程
//#pragma warning (disable: 47...
分类:
其他好文 时间:
2014-05-09 01:08:38
阅读次数:
432
这题wa了很多词,题目本身很简单,把a/b搞反了,半天才检查出来。 1 #include 2
#include 3 #include 4 5 char isPrime[100001]; 6 7 int main() { 8 int i, j, q, p,
maxi, maxj, m...
分类:
其他好文 时间:
2014-05-08 23:55:19
阅读次数:
515
【共享keychain数据】
当往keychain中插入数据时,默认的kSecAttrAccessGroup就是App自身的BundleID。【官方文档】 You can add a
keychain-access-groups entitlement to the application an.....
分类:
其他好文 时间:
2014-05-08 23:21:42
阅读次数:
370
使用asp.net导出Excel有多重方法。经过总结,现推荐一种简易方法,不用再记那些复杂的类名了。code:using
System.Data;using System.IO;//add Microsoft.Excel refference and set operation
right in s...
分类:
Web程序 时间:
2014-05-08 18:16:51
阅读次数:
276
在我们部署redis之前,先了解下redis到底是个啥东西。
redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、
list(链表)、set(集合)和zset(有序集合)。这些数据类型都支持push/pop、add/r...
分类:
Web程序 时间:
2014-05-08 17:58:16
阅读次数:
431
题意:(八皇后问题的变形)给定8个皇后的位置,然后问最少要走几步使得每个皇后之间可以不相互攻击(不在同一行同一列同一斜线)。其中走的过程每步可以横着竖着斜着走多个格子。
解法:先枚举所有合法的八皇后局面(总共92种)。然后将给的点对合法八皇后局面进行匹配。dp[i][j]表示合法八皇后前i个点用掉给定八皇后集合的子集j所花费的最小步数。这里的匹配相当于两个集合各八个点,进行一一配对。原来...
分类:
其他好文 时间:
2014-05-08 11:13:51
阅读次数:
317
说明: 开机启动使用的命令式chkconfig 、防火墙相关的命令式iptables
1、chkconfig 2、iptables 1、chkconfig 参数: --add 新增所指定的系统服务 --del 删除所指定的系统服务 --level
指定该系统服务要在哪个执行等级中开启或关闭 ...
分类:
其他好文 时间:
2014-05-08 10:16:04
阅读次数:
368
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-08 06:33:29
阅读次数:
339