1 /** 2 * SharedPreferences的一个工具类,调用setParam就能保存String, Integer, Boolean, Float, Long类型的参数 3 * 同样调用getParam就能获取到保存在手机里面的数据 4 * @author xiaanmin...
分类:
移动开发 时间:
2014-07-22 08:01:35
阅读次数:
374
C. Ultra-QuickSortTime Limit: 7000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:MainSubmitStatusIn this problem, you have to an...
分类:
其他好文 时间:
2014-07-22 00:37:34
阅读次数:
296
HighwaysTime Limit: 1000 MS Memory Limit: 65536 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status] [Discuss]DescriptionT...
分类:
其他好文 时间:
2014-07-22 00:34:35
阅读次数:
258
选 项 说 明-H, --hostname=ADDRESS 主机名或域名-I, --IP-address=ADDRESS server的IP地址,用于在不能DNS的情况下-p, --port=INTEGER 端口号,默认80-u, --url=PATH url,默认是/-w, --warning=D...
分类:
其他好文 时间:
2014-07-22 00:33:37
阅读次数:
354
The trick is, we can work on a reversed vector - learnt from EPI.class Solution {public: vector plusOne(vector &digits) { std::reverse(digit...
分类:
其他好文 时间:
2014-07-22 00:33:36
阅读次数:
223
B. Get Many Persimmon TreesTime Limit: 1000msMemory Limit: 30000KB64-bit integer IO format:%lld Java class name:MainSubmitStatusSeiji Hayashi had been...
分类:
其他好文 时间:
2014-07-22 00:30:33
阅读次数:
296
list
----------------------------------------------------------------------
??为什么很多在算法库里有的算法还要在类的成员函数里重新实现一遍?
-->1.因为算法库里的是通用的,对于具体的类来说效率不高。
比如说 reverse 如果直接用 stl_algo.h 里的 reverse,会再调用 iter_swap,
而 iter_swap 的实现方法是借用临时变量来交换两个迭代器指向的元素,这样会调用
好几次构造函数、拷贝方法、析构...
分类:
其他好文 时间:
2014-07-22 00:27:35
阅读次数:
357
public class Solution { public String reverseWords(String s) { String ans=reverse(s); String s2[]=ans.split("\\s+"); ...
分类:
其他好文 时间:
2014-07-21 08:20:33
阅读次数:
203
I-number
Time Limit: 5000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
The I-number of x is defined to be an integer y, which satisfied the the conditions below:
1. y>x;
2. the sum of each...
分类:
其他好文 时间:
2014-07-20 23:24:13
阅读次数:
298
简单的二叉树的先根遍历模板的应用
class Solution:
# @param root, a tree node
# @return an integer
def hehe(self, num, root):
#再原来的基础上*10,再加上当前的root.val
num = num * 10 + root.val
...
分类:
其他好文 时间:
2014-07-20 22:45:33
阅读次数:
299