- 博客(12)
- 收藏
- 关注
原创 form表单中文乱码的解决
String name=new String(request.getParameter("storehouseName").getBytes(Charset.forName("ISO-8859-1")),Charset.forName("utf-8"));表单中发生乱码的变量:storehouseName
2014-06-16 11:09:02
633
原创 携程编程大赛1004
#include#include#include#include#define M 40009#define N 2000using namespace std;struct edge{ int y,next,f,d; bool vis;}e[M];int cnt,p[N],gap[N],h[N],n,m,source,sink,X,Y;bool vis[N];int dis[N];void ad
2014-04-14 20:46:31
411
原创 APUE 1-4
#include "apue.h"int main(){ printf("hello world from process ID %d\n",getpid()); exit(0);}打印进程ID
2014-04-10 10:06:51
311
原创 APUE 1-3
#include "apue.h"int main(){ int c; while((c=getc(stdin))!=EOF) if(putc(c,stdout)==EOF) err_sys("output error"); if(ferror(stdin)) err_sys("input erro
2014-04-10 10:06:06
317
原创 APUE 1-2
#include "apue.h"#define BUFFSIZE 4096int main(){ int n; char buf[BUFFSIZE]; while((n=read(STDIN_FILENO,buf,BUFFSIZE))>0) if(write(STDOUT_FILENO,buf,n)!=n) err_sys
2014-04-07 22:00:18
326
原创 Codeforces Round #240 (Div. 2) D. Mashmokh and ACM
#include#includeusing namespace std;const int N=2009;const int M=1e9+7;typedef long long ll;int dp[N][N];int main(){ int i,j,k,n,m,x,y,T; scanf("%d%d",&n,&k); for(i=1;i<=n;i++)
2014-04-07 21:39:37
455
原创 Codeforces Round #240 (Div. 2) C. Mashmokh and Numbers
#include#includeusing namespace std;int main(){ int i,j,k,n,m,x,y,T; scanf("%d%d",&n,&k); if(n/2>k) puts("-1"); else if(n==1){ if(k==0) puts("1");
2014-04-07 21:37:38
413
原创 ZOJ 3772
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5235给定一个序列 A1,A2,A3...An 若干组询问,每组询问给出一个[L,R]定义一个函数F(x)Fi(Li) = ALiFi(Li + 1) = A(Li + 1)for all x >= Li + 2,Fi(x) = Fi(x -
2014-04-06 21:33:58
423
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人