上一页 1 2 3 4 5 6 ··· 20 下一页
摘要: 1 // Code From ftiasch 2 #include <cstdio> 3 #include <cstring> 4 #include <climits> 5 #include <algorithm> 6 using namespace std; 7 8 const int N = 111111; 9 const int INF = 1000000000; 10 11 struct Node { 12 int minimum; 13 Node *left, *right; 14 15 Node(int m, Node *l, N.. 阅读全文
posted @ 2013-05-30 22:11 yefeng1627 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 推荐论文:1.从一类单调性看算法的优化 汤泽2.关于DP的斜率优化http://wenku.baidu.com/view/d3d979dcd15abe23482f4d58.html3. 题目分析http://wenku.baidu.com/view/7745777801f69e3143329449.html4. 动态规划四之四边形不等式和斜率优化http://wenku.baidu.com/view/383d4de59b89680203d825a3.htmlCEOI 2004锯木厂选址预处理各前缀和,然后推出普通DP,然后利用决策单调性进行优化,证明过程有点忧伤,不妨跟着论文推推。#inclu 阅读全文
posted @ 2013-05-30 15:44 yefeng1627 阅读(2004) 评论(0) 推荐(0) 编辑
摘要: 先记录下 阅读全文
posted @ 2013-05-29 19:36 yefeng1627 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 同下 阅读全文
posted @ 2013-05-29 19:36 yefeng1627 阅读(379) 评论(1) 推荐(0) 编辑
摘要: 腾个地,有时间再写。 阅读全文
posted @ 2013-05-29 19:34 yefeng1627 阅读(106) 评论(1) 推荐(0) 编辑
摘要: 先腾个地.有时间再写. 阅读全文
posted @ 2013-05-29 19:33 yefeng1627 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 邻接矩阵: 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #define MIN(a,b) (a)<(b)?(a):(b) 5 const int M = 110; 6 const int inf = 0x3fffffff; 7 int n, m, A[1010], pre[1010]; 8 int remain[M][M], h[M], vh[M], S, T, N;39 int DFS( int u, int flow ) 40 {41 if( u == T ) re 阅读全文
posted @ 2013-05-25 10:23 yefeng1627 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 全名: Aho-Corasick 自动机, 类似 Trie + next函数写法: 动态 / 静态, 个人比较偏向与静态内容: 网上一大堆,我是看的 LRJ新版白书214页静态模板:// Aho-Corasick#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<queue>#include<algorithm>using namespace std;#define Clear(x) memset(x,0,sizeof(x)) 阅读全文
posted @ 2013-05-23 11:43 yefeng1627 阅读(932) 评论(0) 推荐(0) 编辑
摘要: 做了前两场虽然有点恶心,但也没今天那么想吐嘈.... 反正是一题未A..不得不承认依旧很菜..A题,死了命的提示结果错误.... 显然已模拟题.封装 remove 与 maintain 然后print.. 各种情况都考虑,将其后台数据都输出比较.还是未找到错误点在哪里..#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>using namespace std;const int N = 50;char mp[N][N];int n, m;bool vis[N] 阅读全文
posted @ 2013-05-22 23:03 yefeng1627 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 题目来源: 2012天津现场赛A, 背景为麻将的模拟题,按照要求模拟就好。B,sqrt(N)分解因子,然后暴力算即可#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<algorithm>using namespace std;int sum(int x,int b){ int res = 0; while(x){ res += (x%b)*(x%b); x /= b; } return res;}char mp[50] = " 阅读全文
posted @ 2013-05-22 12:13 yefeng1627 阅读(192) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 20 下一页

Launch CodeCogs Equation Editor