
________水题
文章平均质量分 58
一北
一只有梦想的程序员,专注web后端,大数据等领域。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
算法集训(一)水题
/** *@author StormMaybin *@Date 2016-08-16 */ 生命不息,奋斗不止! 大概十几天二十天没有更博客了,这段时间参加了算法集训,参加算法集训主要的目的是为了了解一些常用的算法,提高代码能力等等,并不是单纯为了参加算法竞赛,作为一个有理想的新时代的码农,不懂算法怎么说得过去(哈哈,个人意见)!这段时间刷了不少的题,接下来这段时间就来用博客记录这样一个有意义原创 2016-08-16 01:41:37 · 1233 阅读 · 0 评论 -
leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal
生命不息,奋斗不止 @author stormma @date 2018/03/23 Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. Fo...原创 2018-03-23 16:20:58 · 370 阅读 · 0 评论 -
Leetcode 15. 3sum
@author stormma @date 2017/11/03 生命不息,奋斗不止! 题目Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of z原创 2017-11-03 10:29:15 · 325 阅读 · 0 评论 -
leetcode 75. Sort Colors
生命不息,奋斗不止 @author stormma @date 2017/10/19 题目 Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red,原创 2017-10-20 08:48:10 · 244 阅读 · 0 评论 -
leetcode 29. Divide Two Integers
@author stormma @date 2017/10/27 10:02 – 生命不息,奋斗不止! 题目Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.思路分析方案1被除数-除数,ans++,但是这样如果被除数和除原创 2017-10-27 10:14:57 · 346 阅读 · 0 评论 -
整数划分
/** *@author StormMaybin *@date 2016-11-30 */ 生命不息,奋斗不止。 各种整数划分问题 将n划分成不大于m的划分法: 1. 若是划分多个整数可以存在相同的: dp[n][m]= dp[n][m-1]+ dp[n-m][m] dp[n][m]表示整数 n 的划分中,每个数不大于 m 的划分,则划分数可以分为两种情况: a. 划分中每个数原创 2016-12-01 01:12:00 · 949 阅读 · 0 评论 -
HDU1159最长公共子序列
/** *@ author StormMaybin *@ date 2016-09-29 */– 生命不息,奋斗不止! 题目描述Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a seque原创 2016-09-29 23:50:47 · 739 阅读 · 0 评论 -
搜索POJ1321
/** *@ author StormMaybin *@ date 2016-09-29 */ 生命不息,奋斗不止! 题目描述棋盘问题 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 37025 Accepted: 18237Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆原创 2016-09-29 23:20:33 · 514 阅读 · 0 评论 -
贪心POJ3069
``` /** *@ author StormMaybin *@ date 2016-09-28 */ ``` > 生命不息,奋斗不止!----- #### 题目描述 Saruman's Army Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8018 Accepted: 4100DescriptionSaru原创 2016-09-28 21:59:04 · 531 阅读 · 0 评论 -
贪心POJ3253
/** *@ author StormMaybin *@ date 2016-09-27 */ 生命不息,奋斗不止! 题目分析Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 41139 Accepted: 13409DescriptionFarmer John wants原创 2016-09-27 23:44:20 · 803 阅读 · 0 评论 -
POJ2386经典DFS深搜
/** *@ author StormMaybin *@ date 2016-09-27 */Description Due to recent rains, water has pooled in various places in Farmer John’s field, which is represented by a rectangle of N x M (1 <= N <= 100;原创 2016-09-27 00:11:56 · 772 阅读 · 0 评论 -
整数划分问题
/** *@ author StormMaybin *@ date 2016-09-19 */ 生命不息,奋斗不止! HDOJ 1028 题目描述 “Well, it seems the first problem is too easy. I will let you know how foolish you are later.” feng5166 says. “The se原创 2016-09-19 23:14:04 · 2150 阅读 · 0 评论 -
跳石板
/** *@ author StormMaybin *@ date 2016-09-17 */ 生命不息,奋斗不止! 题目描述小易来到了一条石板路前,每块石板上从1挨着编号为:1、2、3……. 这条石板路要根据特殊的规则才能前进:对于小易当前所在的编号为K的 石板,小易单次只能往前跳K的一个约数(不含1和K)步,即跳到K+X(X为K的一个非1和本身的约数)的位置。 小易当前处在编号为N的石板,原创 2016-09-17 00:47:13 · 1233 阅读 · 0 评论 -
CCF 消除类游戏
/** *@author StormMaybin *@Date 2016-09-09 */ 生命不息,奋斗不止! 题目描述样例输入输出样例说明题目分析 简直水题,直接暴力模拟之即可,但是唯一要注意的是一个棋子可能在某一行和某一列同时被消去,那么如果直接在原map上面修改的话会导致小错误,具体是什么错误呢 我们来看个例子: 2 2 2 2 3 3 2 1 1 假如m原创 2016-09-10 00:10:35 · 1031 阅读 · 0 评论 -
leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal
生命不息,奋斗不止 @author stormma @date 2018/03/23 Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. ...原创 2018-03-23 16:40:31 · 417 阅读 · 0 评论