自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(348)
  • 收藏
  • 关注

原创 ACM动态规划总结(by utobe67)

动态规划一直是ACM竞赛中的重点, 也是难点(对于我这种水平),因为该算法时间效率高,代码量少,多元性强、灵活度高,主要考察思维能力、建模抽象能力。学了这么久动态规划,虽然还只是个菜菜= =,但还是想总结一下,总得给学弟学妹留下一些什么吧。

2015-01-17 15:19:57 8370 4

原创 storm集群搭建

可参考:http://aperise.iteye.com/blog/2295227或者极客学院http://www.jikexueyuan.com/course/724.html极客学院讲解的较为详细,我使用三台虚拟机搭建环境,在搭建过程中主要遇到的问题总结一下:1.zookeeper启动不了。检查每台机器zkdata目录下是否设置了myid。检查端口是否被

2017-12-27 21:12:52 343

原创 leetcode 76. Minimum Window Substring

76. Minimum Window SubstringGiven a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T =

2017-03-26 13:05:19 462

原创 leetcode 456. 132 Pattern

456. 132 PatternGiven a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i j k and ai < ak j. Design an algorithm that takes a list of n numb

2017-03-26 11:19:25 561

原创 leetcode 432. All O`one Data Structure

432. All O`one Data StructureImplement a data structure supporting the following operations:Inc(Key) - Inserts a new key with value 1. Or increments an existing key by 1. Key is guarante

2017-03-26 11:14:45 578

原创 leetcode 146. LRU Cache 460. LFU Cache

146. LRU CacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.get(key) - Get the value (will always be po

2017-03-15 23:05:45 513

原创 leetcode 4. Median of Two Sorted Arrays

There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:nums1 =

2017-03-12 13:25:56 287

原创 Kickstart Round A 2017 Problem A. Square Counting Problem B. Patterns Overlap

感想:Kickstart Round A小计,第一次打Kickstart,据说是进google的必经之路,难度确实还比较难,更可怕的是前面厉害的人太多,第三题是计算几何碰都没怎么碰过的题,AK的人还是那么多= =,可见进google是有多么大的竞争。比赛时只能做出A和b的small,比赛完后想想B的big也是可以做的,然后就做了。ps:第一次打这个比赛,有些规则不是很清楚,原来每次给出

2017-03-05 22:07:04 1425 5

原创 leetcode 两道交换问题

41. First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should ru

2017-01-10 11:18:30 503

原创 hadoop环境配置 windows+eclipse

hadoop安装参考给力星我安装的版本是2.7.0在linux下开发会有一些不方便,非mac档只能尝试在win上远程连接了,幸好有大神写了eclipse的hadoop插件,并且支持远程连接,于是来折腾这一环境。插件安装还是参考给力星由于他的文章是给出的linux+eclipse,改成windos需要将localhost换成linux机器的ip即可,注意hadoop环境的配置文件co

2016-10-10 19:22:10 524

转载 Ubuntu下添加开机启动脚本(转载)

转载于王恒's Blog1、方法一,编辑rc.loacl脚本 Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本。当然要添加到语句:exit 0 前面才行。如:sudo vi /etc/rc.local然后在 exit 0 前面添加好脚本代码。 2、方法二,

2016-09-13 16:16:00 2327

原创 python numpy笔记

numpy笔记,包含常用操作,参考http://www.dataivy.cn/blog/python基础数据处理库-numpy/import numpy as np #创建createarr=np.arange(1,13,1) #开始值 终值(不包括)步长print arrprint np.linspace(1,13,8) #开始值 终值(包括)步长 个数 形成等差

2016-09-01 20:25:31 422

原创 递归转循环的通用方法

1.递归定义:程序调用自身的编程技巧称为递归。栈与递归的关系:递归是借助于系统栈来实现的。每次递归调用,系统都要为该次调用分配一系列的栈空间用于存放此次调用的相关信息:返回地址,局部变量等。当调用完成时,就从栈空间内释放这些单元,在该函数没有完成前,分配的这些单元将一直保存着不被释放。2.递归转化为循环记得有人说过“所有递归都能转化为循环”,某晚睡不着思考了一下这个问题

2016-04-18 20:49:59 22471 1

原创 phpExcel实现表格之间的转换

1.问题描述现在有一个总表staff.xls,每一行代表一个人的数据,要求将该表转换为若干个表people.xls,每一个人为一个表。或者问题反过来,要求将若干个表汇总。2.思路将问题简单化,仔细想想,也就几个步骤:(0)我们知道staff.xls和people.xls的格式布局,有两个这样的模板文件,知道两个表转换时数据是怎样对应的,比如staff的‘BS

2016-03-30 21:53:05 1665

原创 phpExcel常用方法

include 'PHPExcel.php';include 'PHPExcel/Writer/Excel2007.php';//或者include 'PHPExcel/Writer/Excel5.php'; 用于输出.xls的创建一个excel$objPHPExcel = new PHPExcel();保存excel—2007格式$objWriter = new PHPExcel_W

2016-03-30 21:17:35 471

原创 C#编程 井字游戏

一、需求分析游戏规则:两人轮流下棋,谁先将3颗棋子摆成横竖斜一条直线即获胜。界面温馨,支持人机对战、双人对战,电脑难度有简单和困难。二、运行界面

2015-07-14 23:13:07 2508 2

原创 网页抓取信息(php正则表达式、php操作excel)

1.问题描述实现对固定网页上自己需要的信息抓取,以表格形式存储。我是拿wustoj上的一个排行榜来练习的,地址:wustoj2.思路网页自己就简单学习了一下php,刚好用它来做点事情吧,我的想法是这样的:(1)查看网页源代码并保存在文件中。(2)根据需要的信息写出正则表达式,读文件,根据正则表达式来提取需要的信息。写正则表达式的时候最好分组,这样提取起来就方便了很多。

2015-06-08 23:46:07 1432

原创 poj 3691 DNA repair(AC自动机+dp)

DNA repairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5877 Accepted: 2760DescriptionBiologists finally invent techniques of repairing DNA that conta

2015-06-07 22:54:47 770

原创 hdu 2222 Keywords Search(AC自动机入门)

Keywords SearchTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 42138    Accepted Submission(s): 13289Problem DescriptionIn the m

2015-06-07 22:41:31 762

原创 LightOJ 1356 Prime Independence (素数 二分图)

Prime IndependenceTime Limit:3000MS     Memory Limit:32768KB     64bit IO Format:%lld & %lluSubmit Status Practice LightOJ 1356DescriptionA set of integers is called prime independ

2015-06-01 23:38:53 2282

原创 whu oj 1579 - Big data

Problem 1579 - Big data Time Limit: 1000MS   Memory Limit: 65536KB   Total Submit: 73  Accepted: 12  Special Judge: NoDescriptionThe data scientists of CVTE declared that they had di

2015-05-23 11:27:08 946

原创 poj 2777 Count Color (线段树区间更新)

Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 37647 Accepted: 11315DescriptionChosen Problem Solving and Program design as an optional cour

2015-04-14 19:20:05 1180 1

原创 poj 3468 A Simple Problem with Integers (线段树区间更新入门)

A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 70442 Accepted: 21723Case Time Limit: 2000MSDescriptionYou have N i

2015-04-14 19:13:33 683

原创 Codeforces Round #157 (Div. 1) C. Little Elephant and LCM (数学、dp)

C. Little Elephant and LCMtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Little Elephant loves the LC

2014-11-05 22:53:22 1390

原创 zoj 3820 Building Fire Stations (二分+树的直径)

Building Fire StationsTime Limit: 5 Seconds      Memory Limit: 131072 KB      Special JudgeMarjar University is a beautiful and peaceful place. There are N buildings andN - 1 bidirection

2014-10-24 20:39:52 1368

原创 hdu 4249 A Famous Equation (dp 细节)

A Famous EquationTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 514    Accepted Submission(s): 153Problem DescriptionMr. B wr

2014-10-23 21:45:41 870

原创 uva live 6190 Beautiful Spacing (二分+dp检验 根据特有性质优化)

I - Beautiful SpacingTime Limit:8000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit StatusDescriptionText is a sequence of words, and a word consists of character

2014-10-04 15:50:34 1629 1

原创 hdu 1814 Peaceful Commission (2-sat 输出字典序最小路径)

Peaceful CommissionTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1948    Accepted Submission(s): 560Problem DescriptionThe

2014-10-01 23:01:52 1101

原创 hdu 4089 Activation (概率dp 手动消元)

ActivationTime Limit: 20000/10000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1562    Accepted Submission(s): 592Problem DescriptionAfter 4 year

2014-10-01 22:07:20 1033

原创 cug oj 1479 Treasure Chest Lock (区间dp 思维)

1479: Treasure Chest LockTime Limit: 1 Sec  Memory Limit: 128 MBSubmit: 7  Solved: 5[Submit][Status][Web Board]Description Vic has a treasure chest. And there is a lock on the treasure c

2014-10-01 15:12:49 1048

原创 bnu oj 34985 Elegant String (矩阵+dp)

Elegant StringWe define a kind of strings as elegant string: among all the substrings of an elegant string, none of them is a permutation of "0, 1,…, k".Let function(n, k) be the numbe

2014-09-30 16:14:43 1170

原创 poj 1390 Blocks (经典区间dp 方块消除)

BlocksTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 4250 Accepted: 1704DescriptionSome of you may have played a game called 'Blocks'. There are n bloc

2014-09-28 19:49:45 2499

原创 hdu 4412 Sky Soldiers (区间dp 单调性)

Sky SoldiersTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 556    Accepted Submission(s): 179Problem DescriptionAn airplane car

2014-09-25 15:59:28 1191

原创 hdu 3844 Mining Your Own Business (点双连通分量)

Mining Your Own BusinessTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1392    Accepted Submission(s): 219Problem DescriptionJo

2014-09-23 15:34:56 1292

原创 hdu 5036 Explosion (bitset优化的传递闭包求解概率)

ExplosionTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 142    Accepted Submission(s): 25Problem DescriptionEveryone knows Ma

2014-09-22 16:15:08 2109

转载 bitset 用法

出处:点击打开链接bitset 类简化了位集的处理,有些程序要使用二进制位的有序集来保存一组项或条件的标志位,可以考虑使用bitset。需要的文件:#include Using std::bitsetl         bitset 对象的定义和初始化定义bitset时,要明确bitset有多少位:bitset

2014-09-22 16:00:24 2353

原创 hdu 4779 Tower Defense (思维+组合数学)

Tower DefenseTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 474    Accepted Submission(s): 126Problem Description  DRD loves

2014-09-17 17:30:13 1656

原创 hdu 4035 Maze (树上的概率dp)

MazeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1672    Accepted Submission(s): 635Special JudgeProblem DescriptionWhen

2014-09-17 11:29:50 975

原创 hdu 4661 Message Passing (思维 dp求拓扑排序数)

Message PassingTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1184    Accepted Submission(s): 420Problem DescriptionThere ar

2014-09-16 23:46:41 1176

原创 zoj 3816 Generalized Palindromic Number (根据对称性来搜)

Generalized Palindromic NumberTime Limit: 2 Seconds      Memory Limit: 65536 KB A number that will be the same when it is written forwards or backwards is known as a palindromic number. For

2014-09-12 11:08:10 993

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除