2011年7月9日

zoj 1642

摘要: #include<iostream>#include<fstream>#include<cstring>using namespace std;int n;int map[300];char c1[2001],c2[2001];int dp[2002][2002];void read(){// ifstream cin("in.txt"); int i,j,k; char c; while(cin>>n) { for(i=1;i<=n;i++) { cin>>c>>j; map[(int)c]=j 阅读全文

posted @ 2011-07-09 15:40 宇宙吾心 阅读(160) 评论(0) 推荐(0)

zoj 1636

摘要: #include<iostream>#include<fstream>#include<stdio.h>using namespace std;long long map[501][501];int n,m;void read(){// ifstream cin("in.txt"); int i,j,k,s,t,i1,j1; int cas; scanf("%d",&cas); for(s=1;s<=cas;s++) { printf("Case %d:\n",s); scanf(&q 阅读全文

posted @ 2011-07-09 15:21 宇宙吾心 阅读(160) 评论(0) 推荐(0)

zoj 1602

摘要: #include<iostream>#include<fstream>using namespace std;int n;long long dp[101][101];int a[101];void read(){// ifstream cin("in.txt"); int i,j,k,s; while(cin>>n) { for(i=1;i<=n;i++) cin>>a[i]; for(s=2;s<=n;s++) for(i=1;i+s<=n;i++) { j=i+s; dp[i][j]=-1; for(k 阅读全文

posted @ 2011-07-09 15:21 宇宙吾心 阅读(268) 评论(0) 推荐(0)

zoj 1733

摘要: #include<iostream>#include<fstream>#include<cstring>using namespace std;char c1[1001],c2[1001];int dp[1011][1011];void read(){// ifstream cin("in.txt"); int i,j,k; int n1,n2; while(cin>>c1>>c2) { n1=strlen(c1); n2=strlen(c2); for(i=1;i<=n1;i++) for(j=1;j< 阅读全文

posted @ 2011-07-09 15:20 宇宙吾心 阅读(266) 评论(0) 推荐(0)

导航