http://codeforces.com/problemset/problem/659/G 思路: f(i,0/1,0/1) 表示到了第i个,要被切的块开始了没有,结束了没有的状态的方案数 递推看代码: ...
分类:
其他好文 时间:
2016-07-12 13:58:32
阅读次数:
164
There is a fence with n posts, each post can be painted with one of the k colors.You have to paint all the posts such that no more than two adjacent f ...
分类:
其他好文 时间:
2016-07-09 07:04:32
阅读次数:
158
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1724 题目大意: Farmer John想修理牧场栅栏的某些小段。为此,他需要N(1<=N<=20,000)块特定长度的木板,第i块木板的长度为Li(1<=Li<=50,000)。然后,FJ去 ...
分类:
其他好文 时间:
2016-06-27 19:53:39
阅读次数:
153
1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #include <queue> 6 using namespace std; 7 int n,a; 8 typedef l ...
分类:
其他好文 时间:
2016-06-25 16:32:40
阅读次数:
169
Pacemaker1.1概述pacemaker(直译:心脏起搏器),是一个群集资源管理器。它实现最大可用性群集服务(亦称资源管理)的节点和资源级故障检测和恢复使用您的首选集群基础设施(OpenAIS的或Heaerbeat)提供的消息和成员能力。Pacemaker承担集群资源管理者(CRM-ClusterResource
Man..
分类:
Web程序 时间:
2016-06-23 01:12:54
阅读次数:
1578
RedHat6 集群Fence
实验目的:
掌握集群Fence理论和配置
Fence概念:
在HA集群坏境中,备份服务器B通过心跳线来发送数据包来看服务器A是否还活着,主服务器A接收了大量的客户端访问请求,服务器A的CPU负载达到100%响应不过来了,资源已经耗尽,没有办法回复服务器B数据包(回复数据包会延迟),这时服务器B认为服务器A已经挂了,于是备份服务器B把资源夺过来,自己做主...
分类:
其他好文 时间:
2016-06-21 17:50:11
阅读次数:
399
农夫约翰为了修理栅栏,要将一块很长的木板切割成N块。准备切成的木板长度为L1、L2、L3、、、LN,未切割前的木板长度恰好为切割后木板长度的总和。每次切断木板时,需要的开销为这块木板的长度。例如长度为21的木板要切成长度为5,8,8的三块木板。长度为21的木板切成长度为13和8的板时,开销为21。再 ...
分类:
其他好文 时间:
2016-06-18 14:15:37
阅读次数:
427
需要三台纯净的虚拟机,server3作为server1:172.25.45.1server2:172.25.45.2server3:172.25.45.3【server1,server2】1.重新配置yum源vimdvd.repo内容rumrepolist图2.配置/etc/hosts文件图3.yuminstall-yricci4.echowestos|passwd--stdinricci5.chkconfigriccion/etc/init.d/ric..
分类:
其他好文 时间:
2016-06-15 08:05:59
阅读次数:
269
A - Building Fence Time Limit:1000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64u Submit Status A - Building Fence Submit Status Description Lon ...
分类:
其他好文 时间:
2016-05-19 20:58:19
阅读次数:
245