码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
HDU 1542 Atlantis 矩形面积并
题目来源:HDU 1542 Atlantis 题意:给你一些矩形(左下角和右上角)求面积 思路:参考here这个超赞的 一看就懂了 #include #include #include #include using namespace std; const int maxn = 210; struct node { double l, r, h; int s, val; nod...
分类:其他好文   时间:2014-05-07 08:59:09    阅读次数:395
zoj 3612 Median (splay)
题目大意: 添加和删除一个数,然后输出中位数。 简单的Splay   维护Splay上有多少个节点就可以了 #include #include #define inf 1LL<<60 #define maxn 222222 #define keyTree (ch[ch[root][1]][0]) using namespace std; typedef long...
分类:其他好文   时间:2014-05-07 07:46:42    阅读次数:405
C++对象模型
#include using namespace std; class Base   {   public:       Base(){base = 1; cout     virtual ~Base(){cout     virtual void say(){cout private:     int base;       static int count; };...
分类:编程语言   时间:2014-05-07 06:59:24    阅读次数:302
wikioi 1163 访问艺术馆 树形dp
递归建树,由题知该树是一棵二叉树,且除根节点外其他点的度为0或2。 dp[i][j]表示来到第i个走廊(还未走过这条走廊)还剩下j时间,能拿到最大的画的数量。 dp[i][j]=max(dp[i][j],dp[lson[i]][k]+dp[rson][last_time-k]) #include #include using namespace std; int dp[200][70...
分类:其他好文   时间:2014-05-07 05:02:45    阅读次数:295
UVA11107 后缀数组(new模板)
以前的模板和题目 白书例题,基本模板,多个串连接时的处理,二分加分组的处理。 注意n和m的值 n为字符个数 m为最大字符值+1 分组时,分出来的区间是[ ),左闭右开 idx[],的有效只是1-t-1,为t表示自己添加的字符 #include #include #include #include using namespace std; const int maxn = ...
分类:其他好文   时间:2014-05-07 04:50:29    阅读次数:250
wikioi-1748 瑰丽华尔兹 -单调队列优化DP
根据题意,很明显可以推出DP方程。 假如只考虑向左的方向: dp[t][i][j]:  第t个时间段末滑行到i,j最长滑行的距离。 dp[t][i][j]=dp[t-1][i][1..k]+(j-k)=dp[t-1][i][1..k]-k+j(k 最终时间复杂度为O(n*m*k) #include #include #include #include #include using nam...
分类:其他好文   时间:2014-05-07 04:49:13    阅读次数:363
hdu 2087 剪花布条
题目:     链接:http://acm.hdu.edu.cn/showproblem.php?pid=2087 题意:     给出字符串s1和s2,找出s1中有多少个s2。 算法:     KMP字符串匹配。 思路:     简单,看代码吧。(需要注意的就是字符串用要scanf输入) 代码: #include #include #include using namespac...
分类:其他好文   时间:2014-05-07 04:46:37    阅读次数:304
HDU 3038 How Many Answers Are Wrong
http://acm.hdu.edu.cn/showproblem.php?pid=3038 这是一道并查集题目,这并查集感觉好难写,构思花了我很长很长时间,不过打码时间很短。考虑清楚之后明显快多了 #include #include #include #include #include #include #include #define N 200010 using names...
分类:其他好文   时间:2014-05-07 04:03:06    阅读次数:331
递归法求解汉罗塔hanoi问题
#include using namespace std; //汉罗塔递归求解函数 从a移到c void move(int m,char a,char c); void hanoi(int n,char a,char b,char c) { if(1==n) { move(n,a,c); return; } hanoi(n-1,a,c,b); move(n,a,c); hano...
分类:其他好文   时间:2014-05-07 03:24:14    阅读次数:228
NGUI播放视频、全屏等
using UnityEngine; using System.Collections; public class moive : MonoBehaviour { public MovieTexture movTexture; public GameObject moive_texture; public GameObject quan_bt; public GameObject...
分类:其他好文   时间:2014-05-07 03:13:16    阅读次数:426
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!