自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(31)
  • 资源 (1)
  • 收藏
  • 关注

原创 POJ 3714 Raid

Raid Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 9636 Accepted: 2941 Description After successive failures in the battles against the Union, the Empire retreat

2016-01-23 01:41:04 333

原创 BZOJ 2648 SJY摆棋子

2648: SJY摆棋子 Time Limit: 20 Sec Memory Limit: 128 MB Submit: 1631 Solved: 523 Description 这天,SJY显得无聊。在家自己玩。在一个棋盘上,有N个黑色棋子。他每次要么放到棋盘上一个黑色棋子,要么放上一个白色棋子,如果是白色棋子,他会找出距离这个白色棋子最近的黑色棋子。此处的距离是

2015-12-30 05:13:55 352

原创 HDU 4347 The Closest M Points

The Closest M Points Time Limit: 8000MS Memory Limit: 98304KB 64bit IO Format: %I64d & %I64u Submit Status Description The course of Software Design and Development Practice

2015-12-21 03:42:04 888 2

原创 leetcode 287 Find the Duplicate Number

Find the Duplicate Number Total Accepted: 8673 Total Submissions: 25351 Difficulty: Hard Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove t

2015-10-24 23:08:35 509

原创 leetcode 17 Letter Combinations of a Phone Number

Letter Combinations of a Phone Number Total Accepted: 54389 Total Submissions: 210023 Difficulty: Medium Given a digit string, return all possible letter combinations that the number could repr

2015-10-03 13:07:13 392

原创 leetcode 16 3Sum Closet

3Sum Closest Total Accepted: 53147 Total Submissions: 195388 Difficulty: Medium Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target.

2015-10-03 11:51:24 354

原创 Leetcode 20 Valid Parentheses

Valid Parentheses Total Accepted: 71209 Total Submissions: 265268 Difficulty: Easy Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string i

2015-10-03 11:31:18 206

原创 leetcode 19 Remove Nth Node From End of List

Remove Nth Node From End of List Total Accepted: 74559 Total Submissions: 274808 Difficulty: Easy Given a linked list, remove the nth node from the end of list and return its head. For exa

2015-10-03 06:21:24 251

原创 leetcode 42 Trapping Rain Water

Trapping Rain Water Total Accepted: 47928 Total Submissions: 158168 Difficulty: Hard Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how mu

2015-09-22 10:59:43 512

原创 leetcode 268 Missing Number

Missing Number Total Accepted: 13285 Total Submissions: 39921 Difficulty: Medium Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the arr

2015-09-19 07:20:23 390

原创 leetcode 18 4Sum

4Sum Total Accepted: 45122 Total Submissions: 207795 Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the a

2015-08-31 10:30:40 237

原创 leetcode 15 3Sum

3Sum Total Accepted: 70783 Total Submissions: 419673 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

2015-08-27 13:39:48 224

原创 leetcode 14 Longest Common Prefix

Longest Common Prefix Total Accepted: 61429 Total Submissions: 241098 Write a function to find the longest common prefix string amongst an array of strings. 这道题很简单几乎没有什么可说的,我就是从首到尾挨个比较每个字符串是否相

2015-08-25 13:21:43 208

原创 leetcode 13 Roman to Integer

Roman to Integer Total Accepted: 49270 Total Submissions: 143461 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.这道题刚好与上一道题相反,是

2015-08-24 05:43:07 503

原创 leetcode 12 Integer to Roman

Integer to Roman Total Accepted: 39957 Total Submissions: 116987 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.这道题目的要求简洁明了,要求

2015-08-24 05:00:23 302

原创 leetcode 11 Container With Most Water

Container With Most Water Total Accepted: 48739 Total Submissions: 153072 Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are

2015-08-23 11:58:08 346

原创 leetcode 10 Regular Expression Matching

Regular Expression Matching Total Accepted: 51566 Total Submissions: 249926 Implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Ma

2015-08-22 06:56:49 313

原创 leetcode 9 Palindrome Number

Palindrome Number Total Accepted: 74363 Total Submissions: 261192 Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Co

2015-08-19 12:01:20 296

原创 spoj 1 Life, the Universe, and Everything

TEST - Life, the Universe, and Everything Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely… rewrite small numbers f

2015-08-19 06:38:19 474

原创 leetcode 8

String to Integer (atoi) Total Accepted: 60497 Total Submissions: 471866 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a

2015-08-18 03:31:22 290

原创 Leetcode 7 Reverse Integer

Reverse Integer Total Accepted: 89449 Total Submissions: 373087 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 这道题比较简单,我最先采用的是字符串的方法,通过库函数

2015-08-16 23:07:37 414

原创 leetcode 6 ZigZag Conversion

ZigZag Conversion Total Accepted: 50923 Total Submissions: 236853 The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this p

2015-08-14 05:11:45 191

原创 leetcode 5 Longest Palindromic Substring

Longest Palindromic Substring Total Accepted: 62794 Total Submissions: 303283 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000,

2015-08-13 05:27:38 225

原创 leetcode 4 Median of Two Sorted Arrays

Median of Two Sorted Arrays Total Accepted: 59220 Total Submissions: 345234 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays.

2015-08-12 05:30:12 183

原创 leetcode 3 Longest Substring Without Repeating Characters

第三题我写的程序虽然AC了,但在时间上表现不好, 随后在该题的Discuss中找到一个别人写的12行的4ms代码, 感觉方法比我的更巧妙, 所以秉着学习的态度,我这里写一点我对他代码的理解. 最后也附上我的代码. 12行代码的原帖地址:https://leetcode.com/discuss/49128/4ms-c-code-in-12-linesint lengthOfLongestSubstri

2015-08-11 05:37:01 207

原创 leetcode 2 Add Two Numbers

leetcode的第二题比较简单,题目如下: Add Two Numbers Total Accepted: 78845 Total Submissions: 385095 You are given two linked lists representing two non-negative numbers. >The digits are stored in reverse

2015-08-09 10:37:43 267

原创 leetcode 1 Two Sum

leetcode 是一个以经典面试题为题库的OJ,上面的第一题便是这道Two Sum, 题目很简单。 Two Sum Total Accepted: 119107 Total Submissions: 673743 Given an array of integers, find two numbers such that they add up to a specific t

2015-08-08 10:48:20 294

原创 KMP字符串匹配

KMP字符串匹配算法是经典的

2014-09-28 05:20:05 196

原创 Fibonacci数列的log(n)解法

对于Fibonacci数列,每一项等于前两项的和 1,1,2,

2014-09-24 11:52:09 996

原创 POJ3239 Solution to the n Queens Puzzle

POJ3239 http://poj.org/problem?id=3239

2014-09-20 02:45:48 385

原创 just a test

#include int main(){int p;p=0;printf("Hello World");}

2014-09-20 02:41:08 196

WinEdt破解版带注册机

资源中包括绿色版WinEdt及注册机,Help->Register WinEdt中完成注册

2013-10-03

空空如也

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

TA关注的人

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