IP的路由选择,当认识IP时候,把报文发给该IP ,当不知道时,发给默认路由IP。
这就是默认的好处 ,使得所有输入在这一点上,都有去处。
而不像是鲁迅说的,独有叫喊于生人中,而生人并无反应,既非赞同,也无反对,如置身毫无边际的荒原,无可措手的了,这是怎样的悲哀呵
对于输入,不应该像是生人一样, 既然别人来访问你, 有朋自远方来,当然不能装作不认识,那样程序可能就crash了。 起码...
分类:
其他 时间:
2015-05-22 09:48:20
收藏:
0 评论:
0 赞:
0 阅读:
127
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1207
Problem Description
经典的汉诺塔问题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子上从下往上按大小顺序摞着64片黄金圆盘。上帝命令婆罗门把圆盘从下面开始按大小顺序重新摆...
分类:
其他 时间:
2015-05-22 09:48:10
收藏:
0 评论:
0 赞:
0 阅读:
226
Stools
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 626 Accepted Submission(s): 227
Problem Description
Patti and Terri run a...
分类:
其他 时间:
2015-05-22 09:47:39
收藏:
0 评论:
0 赞:
0 阅读:
113
任意两个切割点之间无法再分割
所以如果设dp[i][j] 表示从i位置切到j位置其实没有多大意义,亲测这样会TLE
dp[i][j]表示切割第i个切割点开始的位置到第j个切割点的位置结束的木棍的最小花费
时间复杂度O(n3)O(n^3)/*************************************************************************
>...
分类:
其他 时间:
2015-05-22 09:47:29
收藏:
0 评论:
0 赞:
0 阅读:
138
1419: We Love 01
Time Limit: 1 Sec Memory Limit: 128 MB 64bit IO Format: %lld
Submitted: 30 Accepted: 7
[Submit][Status][Web
Board]
Description
You have N ‘1’ and M ‘0’. You can use all o...
分类:
其他 时间:
2015-05-22 09:47:19
收藏:
0 评论:
0 赞:
0 阅读:
261
<...
分类:
其他 时间:
2015-05-22 09:47:09
收藏:
0 评论:
0 赞:
0 阅读:
237
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define INF 100000000
using namespace std;
#define maxn 10000
#define maxnode 270000
st...
分类:
其他 时间:
2015-05-22 09:46:59
收藏:
0 评论:
0 赞:
0 阅读:
146
题意:
给出n个AGCT组成的字符串和一个数m;
求AGCT能组成的长度为m的串的个数;
n
题解:
构造一个满足题意的长度为x的串之前,我们要先构筑出一个长度为x-1的串;
显然倘若要让x的符合题意,x-1的必符合题意;
那么既然串的前半部分都已经符合题意了,我们只需要考虑x-1那个串的后缀;
就是说那个后缀再加上一个字符之后,能否满足题意;
而当构造x+1的串时,x的...
分类:
其他 时间:
2015-05-22 09:46:50
收藏:
0 评论:
0 赞:
0 阅读:
154
——Java培训、Android培训、iOS培训、.Net培训、期待与您交流! ——
1:文件的合并SequenceInputStream(读取多个文件,写入一个文件中)
获取Enumeration有两种方式
1.1:Vector ve=new Vector();
Enumeration...
分类:
其他 时间:
2015-05-22 09:46:39
收藏:
0 评论:
0 赞:
0 阅读:
297
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#define FOR(i, x, y) for(int i=x;i<=y;i++)
using namespace std;
const int MAXN ...
分类:
其他 时间:
2015-05-22 09:46:30
收藏:
0 评论:
0 赞:
0 阅读:
319
责任链模式的英文是:Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain util an...
分类:
其他 时间:
2015-05-22 09:46:09
收藏:
0 评论:
0 赞:
0 阅读:
223
这一题,简单的广搜或者深搜都可以搞定,时间复杂度都差不多。
我用的是广搜。题目的意思是:@是一个人的起始位置,#不可以走,. 可以走,求出可以走的位置的个数。
一开始没有用结构体来存储坐标,直接用的是z = x * 10 + y;将z入队,结果错了,原因是在取余整除的时候会出错。改用结构体就OK了。
下面是AC的代码:
#include
#include
#include
using...
分类:
其他 时间:
2015-05-22 09:45:39
收藏:
0 评论:
0 赞:
0 阅读:
197
Description
小平在给弟弟检查英语作业时时,发现每个英语句子单词之间的空格个数不等,请你编程帮他把句子中多余的空格去掉,使每个单词之间只保留一个空格,首尾的空格也去掉。
部分代码已给定如下,只需要提交缺失的代码。
#include
int main()
{
void delSpace(char sentence[]);
char sentenc...
分类:
其他 时间:
2015-05-22 09:45:29
收藏:
0 评论:
0 赞:
0 阅读:
276
这一题,简单的贪心就OK了。
下面是AC的代码:
#include
#include
#include
using namespace std;
class data
{
public:
int price, height;
};
int M, N;
data Date[1005];
int cmp(const data &a, const data &b)
{
re...
分类:
其他 时间:
2015-05-22 09:45:19
收藏:
0 评论:
0 赞:
0 阅读:
111
汽车比赛
Time Limit: 1000 MS
Memory Limit: 65536 K
Total Submit: 388(95 users)
Total Accepted: 146(80 users)
Rating:
Special Judge: No...
分类:
其他 时间:
2015-05-22 09:45:09
收藏:
0 评论:
0 赞:
0 阅读:
179
这一周开始学习cocos2d-x,刚开始就碰到了一些问题,新建完工程后,自己给工程添加新的文件,有两种方式:
第一种是使用VS的类向导,让软件帮我们把需要添加的类加入到工程,可以一次把头文件和cpp文件都添加进去,然后我们在HelloWorldScene.cpp的开头使用#include""时,会报出错误提醒“无法打开源文件 **.h”,也就是无法打开我们刚才为工程添加的文件,这是为什么...
分类:
其他 时间:
2015-05-22 09:44:50
收藏:
0 评论:
0 赞:
0 阅读:
327
//母函数模板
//形如(1+x^1+x^2+x^3+....+x^n)*(1+x^2+x^4+x^6+....+x^n)*......(1+x^m+x^2m+x^3m+....+x^n)
#include
using namespace std;
const int lmax=10000;
int c1[lmax+1],c2[lmax+1];
int main()
{
int n,i,j,...
分类:
其他 时间:
2015-05-22 09:44:39
收藏:
0 评论:
0 赞:
0 阅读:
170
本文是 tracker.conf 配置文件的详细介绍。
1 基本配置
disable
#func:配置是否生效
#valu:true、false
disable=false
bind_addr
#func:绑定IP
#valu:IP地址
bind_addr=192.168.6.102
port
#func:服务端口
#valu:端口整数值
port=22122
...
分类:
其他 时间:
2015-05-22 09:44:09
收藏:
0 评论:
0 赞:
0 阅读:
241
问题描述点此链接
Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjacent cell, where “adjacent” cells are tho...
分类:
其他 时间:
2015-05-22 09:43:59
收藏:
0 评论:
0 赞:
0 阅读:
334
前面了解了fastdfs的原理,接下来就熟悉一下安装过程,准备了三台机器,一台模拟client,一台模拟storage,一台模拟tracker。
三台机器均为debian6,系统为最小化安装,先安装基本编译环境:
apt-get install build-essential php5-dev libevent-dev
下载fastdfs源码包:
wget ...
分类:
其他 时间:
2015-05-22 09:43:20
收藏:
0 评论:
0 赞:
0 阅读:
277