自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(47)
  • 资源 (2)
  • 收藏
  • 关注

原创 priority_queue 自定义比较函数

 priority_queue 自定义比较函数#include <iostream>#include <algorithm>#include <queue>#include <cstdio>using namespace std;struct Node{ int x; int y; Node(int a=0, ...

2019-01-01 11:42:51 2007

原创 百练 实现堆结构

//百练 实现堆结构 #include #include #include long heap[100010];long sz = 0;void insert(long x){//插入一个新元素,先将其放置最后端,逐步向上提升 long i = sz++;while(i>0){//p为父节点 long p = (i-1)/2;//如果父节点值

2017-06-30 00:36:50 568

原创 NP-C EXACT 4SAT

3 SAT问题的输入为一个字句集,并且每个字句包含不超过三个的文字。首先如果一个子句集中同时包含V和~V,那么可以消去变量V,之后向每个子句中加入变量直到每个字句中均恰好有4个文字。在4-SAT 问题中如果将某一个文字如X的值设为TRUE 或者False,则该4-SAT问题就转变为3-SAT问题

2017-01-08 23:43:57 406

原创 NP-Complete Stingy Set

Problem:Solution:(由于有公式,所以在word环境编辑后然后截图)

2016-12-19 16:23:29 450

原创 LeetCode 394. Decode String 题解

394. Decode String Add to ListGiven an encoded string, return it's decoded string.The encoding rule is: k[encoded_string], where the encoded_string inside the square br

2016-11-25 17:00:01 413

原创 LeetCode 337. House Robber III 题解

337. House Robber III Add to ListQuestionEditorial Solution My SubmissionsTotal Accepted: 30247Total Submissions: 73770Difficulty: MediumContributors: AdminTh

2016-11-24 17:40:52 362

原创 LeetCode 417. Pacific Atlantic Water Flow 题解

417. Pacific Atlantic Water Flow Add to ListQuestionEditorial Solution My SubmissionsTotal Accepted: 5223Total Submissions: 16297Difficulty: MediumContributors: Admin

2016-11-23 23:56:04 420

原创 LeetCode 120. Triangle 题解

120. Triangle Add to ListQuestionEditorial Solution My SubmissionsTotal Accepted: 87816Total Submissions: 273424Difficulty: MediumContributors: AdminGiven a t

2016-11-23 15:46:32 255

原创 LeetCode 300. Longest Increasing Subsequence 题解

300. Longest Increasing Subsequence Add to ListQuestionEditorial Solution My SubmissionsTotal Accepted: 55308Total Submissions: 149684Difficulty: MediumContributors: 

2016-11-23 15:30:34 284

原创 LeetCode 39. Combination Sum 题解

39. Combination Sum QuestionEditorial Solution My SubmissionsTotal Accepted: 124666Total Submissions: 357084Difficulty: MediumContributors: AdminGiven a set of cand

2016-11-16 15:16:52 450

原创 LeetCode 279. Perfect Squares 题解

279. Perfect Squares QuestionEditorial Solution My SubmissionsGiven a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...

2016-11-04 00:44:17 291

原创 LeetCode 199. Binary Tree Right Side View 题解

199. Binary Tree Right Side View QuestionEditorial Solution My SubmissionsTotal Accepted: 59906Total Submissions: 158112Difficulty: MediumContributors: AdminGiven a

2016-11-03 16:41:55 336

原创 Leetcode 435. Non-overlapping Intervals题解

435. Non-overlapping Intervals QuestionEditorial Solution My SubmissionsTotal Accepted: 1112Total Submissions: 3007Difficulty: MediumContributors: love_FDU_llpGiven

2016-11-02 21:32:51 931

原创 LeetCode 392. Is Subsequence 题解

392. Is Subsequence QuestionEditorial Solution My SubmissionsTotal Accepted: 14531Total Submissions: 33296Difficulty: MediumContributors: AdminGiven a string s and

2016-11-02 16:37:50 524

原创 LeetCode 343. Integer Break 题解

343. Integer Break QuestionEditorial Solution My SubmissionsTotal Accepted: 29402Total Submissions: 66455Difficulty: MediumContributors: AdminGiven a positive integ

2016-10-28 17:01:52 253

原创 LeetCode 96. Unique Binary Search Trees 题解

96. Unique Binary Search Trees QuestionEditorial Solution My SubmissionsTotal Accepted: 100404Total Submissions: 255889Difficulty: MediumContributors: AdminGiven n,

2016-10-28 11:43:08 235

原创 LeetCode 357. Count Numbers with Unique Digits 题解

357. Count Numbers with Unique Digits QuestionEditorial Solution My SubmissionsTotal Accepted: 19808Total Submissions: 44589Difficulty: MediumContributors: Admin

2016-10-26 17:17:16 220

原创 416. Partition Equal Subset Sum 题解

416. Partition Equal Subset Sum QuestionEditorial Solution My SubmissionsTotal Accepted: 5652Total Submissions: 15309Difficulty: MediumContributors: AdminGiven a no

2016-10-26 17:02:10 351

原创 LeetCode 413. Arithmetic Slices 题解

413. Arithmetic Slices QuestionEditorial Solution My SubmissionsTotal Accepted: 3109Total Submissions: 5803Difficulty: MediumContributors: XiangyuLi926A sequence of

2016-10-26 00:34:21 334

原创 LeetCode 213. House Robber II 题解

213. House Robber II QuestionEditorial Solution My SubmissionsTotal Accepted: 41692Total Submissions: 127872Difficulty: MediumContributors: AdminNote: This is an ex

2016-10-24 15:30:54 208

原创 LeetCode 198. House Robber 题解

198. House Robber QuestionEditorial Solution My SubmissionsTotal Accepted: 98866Total Submissions: 269326Difficulty: EasyContributors: AdminYou are a professional r

2016-10-24 00:36:42 299

原创 hdu 2044 一只小蜜蜂 题解

一只小蜜蜂...Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 63088    Accepted Submission(s): 22872Problem Description有一只经过训练的蜜蜂只能爬向右

2016-10-23 00:39:42 279

原创 LeetCode 310. Minimum Height Trees题解

310. Minimum Height Trees QuestionEditorial Solution My SubmissionsTotal Accepted: 21692Total Submissions: 77582Difficulty: MediumContributors: AdminFor a undirecte

2016-10-19 18:26:42 269

原创 LeetCode 101. Symmetric Tree 题解

101. Symmetric Tree QuestionEditorial Solution My SubmissionsTotal Accepted: 135050Total Submissions: 374655Difficulty: EasyContributors: AdminGiven a binary tree,

2016-10-16 00:32:24 307

原创 Leet Code 103. Binary Tree Zigzag Level Order Traversal 题解

103. Binary Tree Zigzag Level Order Traversal QuestionEditorial Solution My SubmissionsTotal Accepted: 75753Total Submissions: 243834Difficulty: MediumContributors: Admin

2016-10-15 00:43:39 199

原创 LeetCode 107 Binary Tree Level Order Traversal II题解

107.Binary Tree Level Order Traversal IIEditorial Solution My SubmissionsTotal Accepted: 100387Total Submissions: 274339Difficulty: EasyContributors: AdminG

2016-10-15 00:21:33 237

原创 LeetCode 102. Binary Tree Level Order Traversal 题解

102. Binary Tree Level Order Traversal QuestionEditorial Solution My SubmissionsTotal Accepted: 130184Total Submissions: 365689Difficulty: EasyContributors: AdminGi

2016-10-15 00:04:49 245

原创 LeetCode 200. Number of Islands 题解

200. Number of Islands QuestionEditorial Solution My SubmissionsTotal Accepted: 67432Total Submissions: 219192Difficulty: MediumContributors: AdminGiven a 2d grid m

2016-10-14 00:57:23 324

原创 LeetCode 210. Course Schedule II 题解

210. Course Schedule II Total Accepted: 39355Total Submissions: 165528Difficulty: MediumThere are a total of n courses you have to take, labeled from 0 to n - 1.Some course

2016-10-13 00:05:53 399

原创 LeetCode 207. Course Schedule 题解

207. Course Schedule There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first

2016-10-12 00:58:52 337

原创 LeetCode 129. Sum Root to Leaf Numbers 题解

129. Sum Root to Leaf Numbers QuestionEditorial Solution My SubmissionsTotal Accepted: 91108Total Submissions: 264689Difficulty: MediumGiven a binary tree containin

2016-10-11 20:30:42 221

原创 Poj 2386 Lake Counting 题解

Lake CountingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 30372 Accepted: 15176DescriptionDue to recent rains, water has pooled in various places in

2016-10-11 19:49:21 275

原创 LeetCode 100. Same Tree 题解

问题描述:100. Same Tree Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical

2016-10-11 19:14:58 199

原创 LeetCode 110. Balanced Binary Tree 题解

题目描述:110. Balanced Binary Tree Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary

2016-10-11 19:01:44 185

原创 LeetCode 111. Minimum Depth of Binary Tree 题解

111. Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest

2016-10-10 00:39:02 186

原创 LeetCode 112. Path Sum 题解

112. Path Sum QuestionEditorial Solution My SubmissionsGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values alo

2016-10-09 01:05:19 232

原创 LeetCode 257. Binary Tree Paths 题解

257. Binary Tree Paths QuestionEditorial Solution My SubmissionsTotal Accepted: 70120Total Submissions: 214949Difficulty: EasyGiven a binary tree, return all root-t

2016-10-07 01:04:43 200

原创 LeetCode 62. Unique Paths 题解

题目描述:62. Unique Paths QuestionEditorial Solution My SubmissionsTotal Accepted: 106575Total Submissions: 279213Difficulty: MediumA robot is located a

2016-10-05 17:32:32 273

原创 8. String to Integer (atoi) 题解

题目描述:8. String to Integer (atoi) Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see

2016-10-05 01:11:06 307

原创 LeetCode 401. Binary Watch 题解

题目描述:401. Binary Watch A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59).Each LED represent

2016-09-27 20:30:21 478 2

PSO算法全局版本c++代码

给出了pso全局算法的c++源代码,可以通过自己调节fitness函数,来实现函数最优值的求解。

2015-09-07

空空如也

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

TA关注的人

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