写这道题目的时候遇到了一个令人诧异的问题,就是平台上跑来的结果和我本机跑起来的结果不一样。后来Debug了之后才发现是我数组开小了,只开到100 的数组竟然都去访问他170位的地址肯定要跪成翔啊...好吧,解释一下题意。有N盏台灯,C次操作每次操作可以按一次按钮,一共一个四个按钮可以得出的规律是每6...
分类:
其他好文 时间:
2015-02-20 23:06:37
阅读次数:
189
Costume Party
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 11793
Accepted: 4770
Description
It's Halloween! Farmer John is taking the cows to a costum...
分类:
其他好文 时间:
2015-02-20 14:08:50
阅读次数:
133
deque 的插入操作不一定有 vector 快
#include
#include
#include
#include
using namespace std;
#define NOT_SELECTED 0
#define SELECTED 1
#define SIZE 6001
vector relations[SIZE];
bool visited[SIZE];
int DP[...
分类:
其他好文 时间:
2015-02-18 22:07:01
阅读次数:
310
Anniversary party
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 4567
Accepted: 2594
Description
There is going to be a party to celebrate the 80-th Anniv...
分类:
其他好文 时间:
2015-02-14 17:34:09
阅读次数:
153
要邀请n个人参加party,每个人有力量值strength Si和魅力值 beauty Bi,如果存在两人S i ≤ S j and B i ≥ B j 或者 S i ≥ S j and B i ≤ B j 他们两个会产生冲突,问在不产生冲突的条件下,最多能邀请到几个人?【LIS】一开始将所有人按照...
分类:
其他好文 时间:
2015-02-11 10:41:16
阅读次数:
149
传送门:Party题意:有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是不会同时出现在聚会上的。有没有可能会有n 个人同时列席?分析:two-sat裸题,对于有仇恨的两对夫妻u,v,连边u...
分类:
其他好文 时间:
2015-02-10 15:15:40
阅读次数:
188
http://acm.hdu.edu.cn/showproblem.php?pid=1520
Problem Description
There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierar...
分类:
其他好文 时间:
2015-02-08 10:24:25
阅读次数:
144
将表里的数据批量生成INSERT语句的存储过程 增强版有时候,我们需要将某个表里的数据全部或者根据查询条件导出来,迁移到另一个相同结构的库中目前SQL Server里面是没有相关的工具根据查询条件来生成INSERT语句的,只有借助第三方工具(third party tools)这种脚本网上也有很多,...
分类:
其他好文 时间:
2015-02-07 17:09:14
阅读次数:
172
1.用VC命令行在boost目录下执行bootstrap.bat会在boost目录下生成bjam.exe2.编译boost 编译32位static lib: bjam stage --toolset=msvc-12.0 --stagedir="D:\third_party\boost_1_5...
分类:
其他好文 时间:
2015-02-06 20:13:17
阅读次数:
161
题意:
给一个二分图,判断最大点独立集是否唯一。
分析:
匈牙利算法。
代码:
//poj 3342
//sep9
#include
#include
#include
using namespace std;
const int maxN=212;
int n;
int M,v1,v2;
bool g[maxN][maxN];
bool vis[maxN];
int link[...
分类:
其他好文 时间:
2015-02-06 16:48:09
阅读次数:
130