码迷,mamicode.com
首页 >  
搜索关键字:“How are you    ( 33751个结果
When to use Class.isInstance() & when to use instanceof operator?
I think the official documentation gives you the answer to this one (albeit in a fairly nonspecific way):This method is the dynamic equivalent of the ...
分类:其他好文   时间:2014-05-14 03:31:06    阅读次数:223
【LeetCode】Rotate Image
You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?思路:先将矩阵转置,然后将第一列与最后...
分类:其他好文   时间:2014-05-14 03:09:35    阅读次数:225
Leetcode 贪心 Best Time to Buy and Sell Stock
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Best Time to Buy and Sell Stock  Total Accepted: 13234 Total Submissions: 43145 Say you have an array for which the ith ele...
分类:其他好文   时间:2014-05-13 07:30:13    阅读次数:276
java回调
一句话,回调是一种双向调用模式,什么意思呢,就是说,被调用方在被调用时也会调用对方,这就叫回调。“If you call me, i will call back”。不理解?没关系,先看看这个可以说比较经典的使用回调的方式:class A实现接口InA ——背景1class A中包含一个class ...
分类:编程语言   时间:2014-05-12 21:24:29    阅读次数:508
HDU 4027 Can you answer these queries?(线段树,区间更新,区间查询)
题目线段树简单题意:区间(单点?)更新,区间求和更新是区间内的数开根号并向下取整这道题不用延迟操作//注意://1:查询时的区间端点可能前面的比后面的大;//2:优化:因为每次更新都是开平方,同一个数更新有限次数就一直是1了,所以可以这样优化#include #include#define N .....
分类:其他好文   时间:2014-05-12 20:01:38    阅读次数:295
【LeetCode】Spiral Matrix II
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:其他好文   时间:2014-05-12 19:53:23    阅读次数:332
SPOJ 4487. Can you answer these queries VI splay
题目链接:点击打开链接 题意比较明显,不赘述。 删除时可以把i-1转到根,把i+1转到根下 则i点就在 根右子树 的左子树,且只有i这一个 点 #include #include #include #include using namespace std; #define N 300500 #define inf 10000000 #define L(x) tree[x].ch[0] #d...
分类:其他好文   时间:2014-05-11 21:05:52    阅读次数:365
HDU 4027 Can you answer these queries? 线段树裸题
题意: 给定2个操作 0、把区间的每个数sqrt 2、求和 因为每个数的sqrt次数很少,所以直接更新到底,用个标记表示是否更新完全(即区间内的数字只有0,1就不用再更新了) #include #include #include #include #include #include #include #include using namespace std; #define N 1000...
分类:其他好文   时间:2014-05-11 21:02:45    阅读次数:325
【LeetCode】Insert Interval
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially...
分类:其他好文   时间:2014-05-11 16:35:35    阅读次数:224
leetcode | Text Justification
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You shoul...
分类:其他好文   时间:2014-05-11 15:15:29    阅读次数:287
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!