Description对于从1到N的连续整集合,能划分成两个子集合,且保证每个集合的数字和是相等的。举个例子,如果N=3,对于{1,2,3}能划分成两个子集合,他们每个的所有数字和是相等的:{3} and {1,2}这是唯一一种分法(交换集合位置被认为是同一种划分方案,因此不会增加划分方案总数)如果...
分类:
其他好文 时间:
2015-04-04 16:32:40
阅读次数:
97
1574: [Usaco2009 Jan]地震损坏DamageTime Limit:10 SecMemory Limit:64 MBSubmit:425Solved:232[Submit][Status][Discuss]Description农夫John的农场遭受了一场地震.有一些牛棚遭到了损坏,...
分类:
其他好文 时间:
2015-04-04 15:00:40
阅读次数:
100
系统环境:[root@ORACLE logs]# uname -aLinux ORACLE 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux[root@ORACLE logs]# cat...
分类:
Web程序 时间:
2015-04-03 12:51:48
阅读次数:
143
系统环境:[root@ORACLE logs]# uname -aLinux ORACLE 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux[root@ORACLE logs]# cat...
分类:
其他好文 时间:
2015-04-02 18:20:15
阅读次数:
151
题意:
有n和城市和m条路,每个城市都有产生金量和收集金量,现在要把所有黄金收集,求经过的最短边是多少。
分析:
二分+最大流或用并查集合并等价类。
//poj 3228
//sep9
#include
#include
using namespace std;
const int maxN=256;
const int maxM=10024;
int p[maxN],sum[maxN...
分类:
其他好文 时间:
2015-04-02 11:42:56
阅读次数:
129
For a security research, we need to put metasploit-framework on the remote machine. OS Details:[centos@localhost centos]$ uname -a
Linux localhost.localdomain 2.6.32-042stab104.1 #1 SMP Thu Jan 29 12:...
分类:
Web程序 时间:
2015-03-29 10:50:38
阅读次数:
209
一道简单的最短路,因为数组下标问题检查了一个小时,悲剧。。。。。
两种做法:一种是用Z作为源点求到其它点的最短路,一种是直接用Floyd算法求出所有点之间的最短路。我才用了第一种做法代码如下;/*
ID:15674811
LANG:C++
PROG:comehome
*/#include
#include
#include
#include<a...
分类:
其他好文 时间:
2015-03-27 22:24:00
阅读次数:
153
GoldRushTime Limit:2000ms,Special Time Limit:5000ms,Memory Limit:65536KBTotal submit users:15,Accepted users:10Problem 13249 :No special judgementProb...
分类:
其他好文 时间:
2015-03-22 00:17:11
阅读次数:
259
因为dp(i,j)=dp(j,i),所以令i>j. dp(i,j)=max(dp(k,j))+1(0#include#include#include#include#define rep(i,n) for(int i=0;i Map;int ok[maxn][maxn];int d[maxn][ma...
分类:
其他好文 时间:
2015-03-21 18:34:38
阅读次数:
136
hamming解题报告--------------------------------------------------------------------------------------------------------------------------------------...
分类:
其他好文 时间:
2015-03-20 18:06:08
阅读次数:
123