问题:判断链表是否有环。分析:利用快慢指针slow,fast slow指针每次走一步,fast指针每次走两步,倘若存在环,则slow和fast必定在某一时刻相遇。 由于fast指针走的比slow快所以循环的时候只需要判断fast和fast->next不为空,判断fast->next是因为...
分类:
其他好文 时间:
2014-07-31 12:25:26
阅读次数:
236
1到4的随机数Random Random1 = new Random(); int i = Random1.Next(1,4); Console.WriteLine(i); Console.ReadKey();
分类:
其他好文 时间:
2014-07-31 09:41:45
阅读次数:
209
1,配置DHCP服务器编辑DHCP服务器配置文件位置在/etc/dhcp/dhcpd.conf指定next-server以及filename2、配置tftpserver#yuminstalltftp-server安装tftp-server#chkconfigtftpon确保tftp启动#servicexinetdrestart重启超级守护进程#ss-unl|grep:69查看69号端口3、提供PXE的工作环..
分类:
其他好文 时间:
2014-07-31 03:15:56
阅读次数:
217
1.安装dhcp服务#yuminstalldhcpd修改配置文件/etc/dhcp/dhcpd.conf#Thisisaverybasicsubnetdeclaration.subnet172.16.249.0netmask255.255.255.0{range172.16.249.111172.16.249.115;optionrouters172.16.0.1;next-server172.16.249.161;filename"pxelinux.0";}启动dhcp服务#se..
分类:
其他好文 时间:
2014-07-31 03:15:06
阅读次数:
196
基本流程:1、网卡作为可引导的启动设备2、BIOS找到引导设置网卡,激活网卡的PXE功能3、客户端通过PXE的内置dhcp客户端尝试DHCP广播请求,从DHCP服务器获取IP地址、掩码、网关、网络属性4、DHCP服务器告知客户端tftp服务器地址(next-server),将"filename"pxelinux.0";"参数中..
分类:
其他好文 时间:
2014-07-31 03:08:56
阅读次数:
298
??
安装Apach
配置ApacheRuntime
下面的过程中一直点击next
配置CGI,放开配置:AddHandler
cgi-script .cgi
2.添加Option,截图
3.编写CGI代码如下:
#define
_CRT_SECURE_NO_WARNINGS
//取消安全检查
#...
分类:
编程语言 时间:
2014-07-31 03:02:15
阅读次数:
430
解题报告
思路:
字典树应用,dfs回溯遍历字典树
#include
#include
#include
using namespace std;
struct node {
int v;
node *next[26];
};
int l,m,cnt;
char str[100],ch[100],dic[5500][100];
node *newnode()
{
...
分类:
其他好文 时间:
2014-07-31 00:05:35
阅读次数:
283
题目链接:uva 1485 - Permutation Counting
题目大意:给定n和k,要求求一个由1~n组成的序列,要求满足ai>i的i刚好有k个的序列种数。
解题思路:dp[j][i]表示长度为i,j个位置满足的情况。
dp[j+1][i]+=dp[j][i]?(j+1);
1, (3), (4), 2: 括号位置代表ai>i,既满足位置,此时i
= 4...
分类:
其他好文 时间:
2014-07-31 00:00:55
阅读次数:
227
terator是一个集合的迭代器,通过Iterator访问接口就就不用关心集合的实现.Iterator接口中定义了三个方法:1.hasNext()是否还有下一个元素.2.next()返回下一个元素.3.remove()删除当前元素.只定义了简单的三个方法,这里要注意几点:1)Iterator和Enu...
分类:
其他好文 时间:
2014-07-30 23:50:35
阅读次数:
248
Hadoop MapReduce Next Generation - Setting up a Single Node Cluster.PurposeThis document describes how to set up and configure a single-node Hadoop in...
分类:
其他好文 时间:
2014-07-30 23:41:45
阅读次数:
284