上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页
摘要: 71 7 3 5 9 4 8求最长上升子序列的个数#includeusing namespace std;int dp[10001];int a[10001];int main(){ int max; int i,j; int n; while(scanf("%d",&n)!=EOF) { max... 阅读全文
posted @ 2014-07-15 16:12 _一千零一夜 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 81.86 1.86 1.30621 2 1.4 1 1.97 2.2有八个大兵身高如上 求至少出列几个大兵可以站成山形队列#includeusing namespace std;double a[1111];int dp1[1111];int dp2[1111];int main(){ int i... 阅读全文
posted @ 2014-07-15 16:11 _一千零一夜 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Poj 3267题意:6 10Browndcodw 长度为10下面为字典 cowmilkwhiteblackbrownfarmer 让求字符串删除多少字符可以与字典匹配#include#include#includeusing namespace std; int w,l,dp[305];char ... 阅读全文
posted @ 2014-07-15 16:10 _一千零一夜 阅读(249) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;int map[1111][1111];int d[1111];int fa[1111];int n,m;//int d[1111];int getfa(int x){ while(fa[x]!=x) x=f... 阅读全文
posted @ 2014-07-14 12:48 _一千零一夜 阅读(109) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-06-25 09:20 _一千零一夜 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 看了大神的博客:http://user.qzone.qq.com/289065406/blog/1304831877题意: 在n (n#include#includeusing namespace std;struct Node{ int x; Node *next;}hash[1000... 阅读全文
posted @ 2014-06-16 19:48 _一千零一夜 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题意:给定一个整数序列 问 只允许相邻的两个数交换 至少需要交换多少次思路:归并排序#include __int64 count;int array[500001],temp[500001]; void merge(int array[],int p,int q,int r) ///// p < ... 阅读全文
posted @ 2014-06-16 18:36 _一千零一夜 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 做完这个题我知道什么叫做水体了#include#include#includeusing namespace std;int a[10000];int main(){ int i; int n; cin>>n; for(i=0;i<n;i++) scanf("%... 阅读全文
posted @ 2014-06-14 17:22 _一千零一夜 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题意:找n 个字符串中最长的公共子川 若存在多个最常的则输出 字典序最小的思路:kmp 擦 本来没难度 结果因为字典序 错过了n次#include#include#includeusing namespace std;char str[22][66];int next[66];int L;char ... 阅读全文
posted @ 2014-06-14 17:11 _一千零一夜 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 题意:给定两个字符串 判断是否在第二个字符串中存在子串(可以不连续)为第一个穿大水体#includeusing namespace std;char s[100001],t[100001];int main(){ int ls,le; int ts,te; int l1,l2; ... 阅读全文
posted @ 2014-06-13 19:25 _一千零一夜 阅读(100) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页