首页 > 其他
生活小常识
1.你衣服的颜色在很大程度会影响到你朋友的心情。2.如果夫妻都明白双方需要一段时间独处,那么这段婚姻会走的更远。3.半夜独自醒来,那个让你牵肠挂肚的人,不是让你开心,就是让你忧愁。4.人在疲惫的时候,会更加诚实。这就是为什么我们选择在夜幕降临之后,才来坦白自己内心真实的世界。5.如果两个人都在说另外...
分类:其他   时间:2015-08-12 21:35:02    收藏:0  评论:0  赞:0  阅读:182
[Leetcode] Combination Sum
由于每个元素我可以出现的次数没有限制,我们可以在使用某个元素的时候进行计算一下最多的个数,进行枚举。同样的道理,在每一层递归只考虑一个元素,并且在当前sum大于目标sum的时候进行剪枝。 1 import java.util.*; 2 3 public class Solution { 4 ...
分类:其他   时间:2015-08-12 21:34:42    收藏:0  评论:0  赞:0  阅读:98
2015 HUAS Summer Trainning #5~J
DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,ifsis a regul...
分类:其他   时间:2015-08-12 21:34:32    收藏:0  评论:0  赞:0  阅读:236
[Leetcode] Add Two Numbers
数字表示为链表的格式,需要注意的几个地方:一、在计算过程当中要注意进位问题,刚开始的进位为0,后面进位要在计算过程当中进行更新。二、如果某个数字的list比较长,那么需要在最后将其加上三、最后如果进位不是零,说明需要额外增加一位代码如下: 1 /** 2 * Definition for sing....
分类:其他   时间:2015-08-12 21:34:12    收藏:0  评论:0  赞:0  阅读:166
013实现使用两个堆栈队列(keep it up)
实现使用两个堆栈队列FIFO队列是一种数据结构(FIFO),后堆叠前进出的数据结构的(FILO)。两个栈实现的最简单的方法就是排队:队列中的第一个推栈,队列将数据顺序的第一个堆栈推入第二堆叠,然后叠加.两个规则:1)进队列,则直接压入第一个栈2)出队列,若果第二个栈不为空。直接pop(),如过第二个...
分类:其他   时间:2015-08-12 21:34:02    收藏:0  评论:0  赞:0  阅读:235
asdfdsf
1 package com.journaldev.util; 2 3 import java.util.HashMap; 4 import java.util.Iterator; 5 import java.util.Map; 6 import java.util.concurrent.Conc.....
分类:其他   时间:2015-08-12 21:33:42    收藏:0  评论:0  赞:0  阅读:158
[Leetcode] Combination Sum II
实际上这里的道理和Combination Sum是一样的,只是对于每个元素的次数我们不需要在每次递归的时候进行计算上限,因为题目限制了最多的出现次数。其他类似。 1 import java.util.*; 2 3 public class Solution { 4 private void...
分类:其他   时间:2015-08-12 21:33:32    收藏:0  评论:0  赞:0  阅读:129
POJ 1789 Truck History
Truck HistoryDescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture...
分类:其他   时间:2015-08-12 21:33:22    收藏:0  评论:0  赞:0  阅读:160
结构体 练习
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace 结构体__练习{ class Program { ...
分类:其他   时间:2015-08-12 21:33:02    收藏:0  评论:0  赞:0  阅读:95
集训第五周动态规划 G题 回文串
DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write...
分类:其他   时间:2015-08-12 21:32:32    收藏:0  评论:0  赞:0  阅读:218
Tree(prime)
TreeTime Limit : 6000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 2Problem DescriptionT...
分类:其他   时间:2015-08-12 21:32:12    收藏:0  评论:0  赞:0  阅读:184
BaLaBaLa
#include#include#include#include#includeusing namespace std;struct node{ friend bool operator Q; for(int i=1;i<=n;i++) { node k; k.ID=i; k.Time=...
分类:其他   时间:2015-08-12 21:31:42    收藏:0  评论:0  赞:0  阅读:136
新笔记
package com.journaldev.util;import java.util.HashMap;import java.util.Iterator;import java.util.Map;import java.util.concurrent.ConcurrentHashMap;publ...
分类:其他   时间:2015-08-12 21:31:12    收藏:0  评论:0  赞:0  阅读:303
[Leetcode] Two Sum
1 import java.util.*; 2 3 public class Solution { 4 public int[] twoSum(int[] nums, int target) { 5 Map map = new HashMap(); 6 i...
分类:其他   时间:2015-08-12 21:30:52    收藏:0  评论:0  赞:0  阅读:203
Balanced Binary Tree
Given a binary tree , determine if it is height-balancedimplement method is in java language,iterator through the height rather than the depthpublic i...
分类:其他   时间:2015-08-12 21:30:32    收藏:0  评论:0  赞:0  阅读:202
集训第五周动态规划 F题 最大子矩阵和
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the...
分类:其他   时间:2015-08-12 21:30:02    收藏:0  评论:0  赞:0  阅读:260
NEU OJ 1644 Median I
优先级队列#include#include#include#include#includeusing namespace std;int n;int main(){ while(~scanf("%d",&n)) { int tot=0; priority_qu...
分类:其他   时间:2015-08-12 21:29:32    收藏:0  评论:0  赞:0  阅读:278
ACM 01背包问题
DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because th...
分类:其他   时间:2015-08-12 21:28:52    收藏:0  评论:0  赞:0  阅读:288
IPC对象的持续性
转载:http://book.51cto.com/art/201006/207275.htm《UNIX网络编程:第2版.第2卷,进程间通信》本书全面深入地讲解了各种进程间通信形式,包括消息传递、同步、共享内存及远程调用(RPC)。书中包含了大量经过优化的源代码,帮助读者加深理解。这些源代码可以从图灵...
分类:其他   时间:2015-08-12 21:28:22    收藏:0  评论:0  赞:0  阅读:262
[Leetcode] Two Sum II - Input array is sorted
这里因为是有序的,可以利用这个有序性来进行查找left=0,right=num.length-1;while(lefttarget) right--; else return true;}return false;
分类:其他   时间:2015-08-12 21:28:12    收藏:0  评论:0  赞:0  阅读:154
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!