#include #include#includeusing namespace std;char a[10002];int b[10002];int n,ans;int dp(int x){ int i,j,max; b[0]=1; for(i=1;i>n;for(i=1;i#include#.....
分类:
其他好文 时间:
2014-08-12 18:57:04
阅读次数:
183
//记忆式搜索 #include #include#includeusing namespace std;char a[10002];int b[10002];int n,ans;int f(int x){ int i,t; if(b[x]>0) return b[x]; b[x]=1; for(....
分类:
其他好文 时间:
2014-08-12 18:43:24
阅读次数:
138
本例源于关东升同名书籍,有兴趣可以去买一本,我手头就一本,初看,还不错:所有网络编程步骤都大同小异:服务器的工作流程:1. 服务器调用 socket(...) 创建socket; 2. 服务器调用 listen(...) 设置缓冲区; 3. 服务器通过 accept(...)接受客...
分类:
移动开发 时间:
2014-08-12 16:20:04
阅读次数:
362
listen函数的定义如下所示:
#include
int accept(int sockfd, struct sockaddr * restrict addr, socklen_t *restrict len);
返回值:若成功则返回文件(套接字)描述符,若出错则返回-1
int listen(int sockfd, int backlog);返回值:若成功则返回0;若出错则返回-1...
分类:
其他好文 时间:
2014-08-12 00:47:03
阅读次数:
242
*filter:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]:RH-Firewall-1-INPUT - [0:0]-A INPUT -j RH-Firewall-1-INPUT-A FORWARD -j RH-Firewal...
分类:
系统相关 时间:
2014-08-09 22:58:29
阅读次数:
977
用户态对accept的标准使用方法:if ((client_fd = accept(sockfd, (struct sockaddr *)&remote_addr, &sin_size)) == -1) { //accept()函数让server接收客户的连接请求 perror("acce...
分类:
其他好文 时间:
2014-08-09 18:40:18
阅读次数:
323
Problem 2169 shadow
Accept: 173 Submit: 553
Time Limit: 1000 mSec Memory Limit : 32768 KB
Problem Description
YL是shadow国的国王,shadow国有N个城市。为了节省开支,shadow国只有N-1条道路,这N-1条道路使得N个城市连通。某一年,shadow...
分类:
其他好文 时间:
2014-08-08 16:07:26
阅读次数:
241
最近要用到Django,换成mysql出现了以下问题:The database backend does not accept 0 as a value for AutoField解决方法:cd 到对应的目录sed -i.old 's|\(ForeignKey.*\)default=0|\1defa...
分类:
数据库 时间:
2014-08-08 11:51:35
阅读次数:
1491
When using Code Completion, you can accept the currently highlighted selection in the popup list with the Tab key.Unlike accepting with the Enter k...
分类:
其他好文 时间:
2014-08-08 09:33:15
阅读次数:
252
//我是一个Post请求,我告诉服务器:我要http://localhost:1538/WebForm1.aspx页面,我支持的httpb版本是1.1
POST http://localhost:1538/WebForm1.aspx HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
//告诉服务器我是从哪个页面链接过来的
Refere...
分类:
其他好文 时间:
2014-08-07 19:15:00
阅读次数:
197