码迷,mamicode.com
首页 > 其他好文
Keywords Search (ac 自动机)
ac_automatic 指针...
分类:其他好文   时间:2014-08-12 22:06:44    阅读次数:262
POJ训练计划1177_Picture(扫描线/线段树+离散)
解题报告 题意: 求矩形周长和。 思路: 左扫上扫,扫过了。 #include #include #include #include #include using namespace std; struct Seg { int lx,rx,ly,ry,h,v; friend bool operator < (Seg a,Seg b) { ...
分类:其他好文   时间:2014-08-12 22:06:34    阅读次数:243
hdu 2089 不要62 (数位dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2089 思路:用变量记录吉利数,和最高位为2的吉利数还有不是吉利数的个数。。。 code: #include #include #include using namespace std; int dp[10][3]; //dp[i][j] ,i表示位数,j表示状态//dp[i...
分类:其他好文   时间:2014-08-12 22:06:24    阅读次数:268
【OpenGL 学习笔记02】宽点画线
opengl实现宽点画线。...
分类:其他好文   时间:2014-08-12 22:06:14    阅读次数:250
HDU - 4944 FSF’s game
Problem Description FSF has programmed a game. In this game, players need to divide a rectangle into several same squares. The length and width of rectangles are integer, and of course the side len...
分类:其他好文   时间:2014-08-12 22:06:04    阅读次数:248
opencv对图像进行边缘及角点检测
opencv对图像进行边缘及角点检测 先看结果: 代码: // ConsoleApplication1_812.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "opencv2/opencv.hpp" class Imagedetector{ ...
分类:其他好文   时间:2014-08-12 22:05:44    阅读次数:298
hdu 3555 Bomb(数位dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3555 题目大意:就是给你一个数n,判断从0到n有多少个数含有数字49.。。。。。             是不是觉得跟hdu2089很相似呀。。。 思路:跟hdu2089一样的,注意给出的数比较大,所以这儿用__int64  。。。。 code: #include #incl...
分类:其他好文   时间:2014-08-12 22:05:34    阅读次数:253
xhEditor struts2实现图片上传
xheditor的环境搭建请参考xxx ,这时我们打开图片功能 是没有上传按钮的...
分类:其他好文   时间:2014-08-12 22:05:14    阅读次数:290
File.Delete(), File.Copy(), File.Replace()
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { ...
分类:其他好文   时间:2014-08-12 22:04:54    阅读次数:271
hdu 1847 Good Luck in CET-4 Everybody!
法一: 首先我们可以想到在面对3的时候是必败局,谁面对3时无论拿多少都会败 ! 那么就要尽量造成这样的局势给对方,因为任何不是3的倍数的数加1或2都可以变成3的倍数, 同理减去1或2也可以变成3的倍数,也就是说假设目前的个数不是3的倍数,那我肯定能把它 拿成3的倍数,比如现在是11个,那我拿走2个就变成9,这样就造成对方为3的倍数局势,那 么对方拿m个我都可以通过拿...
分类:其他好文   时间:2014-08-12 22:04:34    阅读次数:226
HDOJ 4939 Stupid Tower Defense
red放到后面显然更优,dp【i】【j】表示前i个塔里有j个blue,最后枚举有多少个red Stupid Tower Defense Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 599    Accepted S...
分类:其他好文   时间:2014-08-12 22:04:24    阅读次数:227
HDU 1231 最大连续子序列 DP题解
典型的DP题目,增加一个额外要求,输出子序列的开始和结尾的数值。 增加一个记录方法,nothing special。 记录最终ans的时候,同时记录开始和结尾下标; 更新当前最大值sum的时候,更新开始节点。 const int MAX_N = 10001; long long arr[MAX_N]; int N, sta, end; long long getMaxSubs() { ...
分类:其他好文   时间:2014-08-12 22:04:14    阅读次数:320
OJ2.0userInfo页面Modify逻辑bug修复,search功能逻辑实现
userInfo页面Modify逻辑bug修复,search功能逻辑实现...
分类:其他好文   时间:2014-08-12 22:04:04    阅读次数:362
hdu 3234 Exclusive-OR (并查集+异或性质)
Exclusive-OR Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2177    Accepted Submission(s): 603 Problem Description You are not gi...
分类:其他好文   时间:2014-08-12 22:04:02    阅读次数:267
求两个数组的交集
问题: 给你两个排序的数组,求两个数组的交集。 比如: A = 1 3 4 5 7, B = 2 3 5 8 9, 那么交集就是 3 5. 思路: 1. 每一次从B数组中取一值,然后在A数组里逐个比较,如果有相等的,则保存。该算法复杂度为 O(MN). M, N 分别为数组 A B 的长度。 2. 因为A B 都排过序,所以,每一次从B数组取值后,可以利用二分查找看是否在数...
分类:其他好文   时间:2014-08-12 22:03:55    阅读次数:219
nyist 289
#include int dp[12888];int w[3408],d[3408];int max(int x,int y) { return x>y?x:y; }int main(){ int n,m,i,j; while(scanf("%d%d",&n,&m)!=EOF...
分类:其他好文   时间:2014-08-12 22:02:04    阅读次数:215
IE IE8 iframe的onload方法分析 IE浏览器onload事件失效
判断iframe是否加载完成的完美方法 IE 支持 iframe 的 onload 事件,不过是隐形的,需要通过 attachEvent 来注册。 第二种方法比第一种方法更完美(采用readystatechange判断),因为 readystatechange 事件相对于...
分类:其他好文   时间:2014-08-12 22:01:54    阅读次数:282
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!