自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 资源 (4)
  • 收藏
  • 关注

原创 POJ1328解题报告 (贪心)

Radar Installation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 87836 Accepted: 19690 DescriptionAssume the coasting is an infinite straight line. Land is in one side of co

2017-06-29 17:17:25 846

原创 POJ 2376 Cleaning Shifts 贪心

Cleaning Shifts Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 21929 Accepted: 5472 DescriptionFarmer John is assigning some of his N (1 <= N <= 25,000) cows to do some clean

2017-06-29 14:24:29 295

原创 poj 3050 dfs(暴力)

Hopscotch Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4259 Accepted: 2848 DescriptionThe cows play the child’s game of hopscotch in a non-traditional way. Instead of a linear

2017-06-28 20:25:46 370

原创 poj3669 bfs

流星雨来袭击我们的女主牛了,Bessie。为了找一个安全地方,她开始逃了。地图相当于平面坐标系第一象限,Bessie一开始在原点。然后,每颗流星都会在某个时刻砸下来,砸到的地方连同上下左右都会被毁灭,此时这些地方Bessie就不能通过了,她只能走其它地方。Bessie的移动速度是每时刻移动一步,上下左右,不能对角线移动。现在求Bessie最小的移动步数。看到最小的,就立马反应,bfs。可是

2017-06-28 15:04:25 232

原创 poj3009 (dfs ,bfs)

Curling 2.0Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 21420 Accepted: 8732DescriptionOn Planet MM-21, after their Olympic games this year, curling

2017-06-27 23:03:37 601

原创 Kruskal算法(贪心+并查集=最小生成树)

每日一看http://www.51nod.com/Kruskal算法的高效实现需要一种称作并查集的结构。我们在这里不介绍并查集,只介绍Kruskal算法的基本思想和证明,实现留在以后讨论。Kruskal算法的过程:(1) 将全部边按照权值由小到大排序。(2) 按顺序(边权由小到大的顺序)考虑每条边,只要这条边和我们已经选择的边不构成圈,就保留这条边,否则放弃这条边。算...

2017-06-21 21:04:01 736

原创 POJ 2431 Expedition (贪心 + 优先队列)

每日一看ExpeditionTime Limit:1000MS Memory Limit:65536K Total Submissions:16212 Accepted:4618 DescriptionA group of cows grabbed a truck and ventured on an expedition deep in...

2017-06-20 16:13:50 454

原创 poj3069 Saruman's Army 贪心

Saruman's ArmyTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10178Accepted: 5122DescriptionSaruman the White must lead his army along a straight pat

2017-06-19 23:00:46 278

原创 POJ-3617-Best Cow Line(贪心算法+Java)

Best Cow LineTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11700Accepted: 3430DescriptionFJ is about to take his N (1 ≤ N ≤ 2,000) cows to the

2017-06-19 21:35:54 376

原创 poj 2386(深搜或广搜)

Lake CountingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 35022Accepted: 17380DescriptionDue to recent rains, water has pooled in various places in

2017-06-19 20:15:03 252

原创 POJ 1788 Building a New Depot

Description 给出几个坐标点,让你求出将所有的点围起来的篱笆的长度,其中每个点都在篱笆的拐角处,求处最小的篱笆的长度 Input 多组输入,每组用例第一行为坐标点个数n,之后n行为每个坐标点的坐标,每组输入后跟一空行,以0结束输入 Output 对于每组用例,输出最小的篱笆长度 Sample Input 6 1 1 1 3 3 3 2 1 

2017-06-15 11:08:23 343

原创 poj 1723 中位数

SOLDIERSTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8960 Accepted: 3133DescriptionN soldiers of the land Gridland are randomly scattered around the

2017-06-15 10:27:54 316

原创 poj 1979 dfs

Red and BlackTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 35582 Accepted: 19262DescriptionThere is a rectangular room, covered with square tiles. Eac

2017-06-14 15:42:46 196

原创 leetcode 39 java dfs

Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen

2017-06-09 10:29:37 651

原创 leetcode Add to List 200. Number of Islands

每日一看Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You ...

2017-06-08 19:39:50 402

原创 leetcode72 Edit Distance

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:

2017-06-07 17:03:19 264

原创 leetcode 53 Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,2,1]

2017-06-07 16:23:19 197

原创 LeetCode 64. Minimum Path Sum 解题报告

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at

2017-06-06 22:14:52 212

原创 hdu1248 (解题报告)

钱币兑换问题Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10463    Accepted Submission(s): 6371Problem Description在一个国家仅有1分,2分,3分硬

2017-06-06 17:18:05 479

原创 hdu1283

最简单的计算机Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7722    Accepted Submission(s): 4342Problem Description一个名叫是PigHeadThre

2017-06-06 14:55:29 263

原创 hdu1282(水题)

回文数猜想Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7177    Accepted Submission(s): 4393Problem Description一个正整数,如果从左向右读(称之为正

2017-06-06 14:23:27 322

原创 hdu 1200 To and Fro

To and FroTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6881    Accepted Submission(s): 4733Problem DescriptionMo and Larry

2017-06-05 20:59:13 289

原创 POJ1328解题报告

每日一看Radar InstallationTime Limit:1000MS Memory Limit:10000K Total Submissions:40799 Accepted:9034 DescriptionAssume the coasting is an infinite straight line. Land is ...

2017-06-05 16:23:30 5924 1

转载 从数组中取出n个元素的所有组合(递归实现)

每日一看今天在做POJ 1753时,需要枚举一个数组中所有组合。之前也遇到过类似的问题,如求从n个数组任意选取一个元素的所有组合都是想起来比较简单,但是设计成算法却颇费周折。如数组为{1, 2, 3, 4, 5, 6},那么从它中取出3个元素的组合有哪些,取出4个元素的组合呢?比如取3个元素的组合,我们的思维是:取1、2,然后再分别取3,4,5,6;取1、3,然后再分别取4,5,6;...

2017-06-05 15:29:47 1613

原创 2017 计蒜之道 初赛 第六场(解题报告)

微软近日推出了一款功能极简的手机,在手机上用一个包含了 7 \times 77×7 个像素的区域来显示手机信号。满信号的时候显示如下:1+-----+2|- 4G|3|-- |4|--- |5|---- |6|-----|7+-----+每一格信号(第 i(1 \le i \le 5)i(1≤i≤5) 格信号有 ii 个-)代表 20\%20% 的信号强度,不足一格信号的部

2017-06-04 21:39:18 272

原创 hdu 1234 开门人和关门人(java版本)

每天第一个到机房的人要把门打开,最后一个离开的人要把门关好。现有一堆杂乱的机房签 到、签离记录,请根据记录找出当天开门和关门的人。 Input 测试输入的第一行给出记录的总天数N ( > 0 )。下面列出了N天的记录。 每天的记录在第一行给出记录的条目数M ( > 0 ),下面是M行,每行的格式为 证件号码 签到时间 签离时间 其中时间按“小时:分钟:秒钟”(各占2位)给出,证件号码是长度

2017-06-04 15:11:30 463

原创 hdu 1196 水题

Lowest BitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12188 Accepted Submission(s): 8895Problem Description Given an positive integer A

2017-06-04 14:19:42 284

原创 hdu1240 三维之Bfs

题意 这同样是一道搜索题,所不同的是要搜索的图是三维的而不是二维的。但这并没什么大的改变,只是增加了两个搜索的方向而已。陷阱 要注意的地方是,所给出的起点终点的坐标是按照 列,行,层的顺序。关于BFS与DFS不同,BFS能保证所搜到的路径一定是最短路径,所以我们不需要维护一个多维(此处为3维)数组来记录访问到每一点的最小步数,只需要维护一个多维数组来标记是否走过就可以了。DFS中是要不停回溯来找

2017-06-02 16:50:17 249

原创 hdu1258 dfs深搜

Sum It UpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6627 Accepted Submission(s): 3477Problem Description Given a specified total t and

2017-06-01 18:30:42 252

servlet+ajax实现搜索框智能提示

通过ajax+servlet实现搜索智能框提示 异步加载

2016-12-20

sprigioc容器配置元数据

本demo 实现maven+spring整合 实现基于xml和注解配置元数据 使用在独立环境中去加载和使用spring容器

2016-12-12

shiro整合spring+springmvcjar包

包含shiro整合spring+springmvc所需要的jar包

2016-12-07

shiro-root-1.3.2-source-release

包含shirojar包和整合配置官方例子说明

2016-12-07

空空如也

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

TA关注的人

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