码迷,mamicode.com
首页 > 其他好文
大数a*b
acm.pdsu.edu.cn欢迎大家来练题...
分类:其他好文   时间:2015-03-20 22:03:52    阅读次数:124
HDU 4336 Card Collector 状压+概率dp
题目链接:点击打开链接 dp[i] 表示已经拥有卡片的状态为i, 还需要吃多少包才能拥有所有卡片, 显然 dp[(1 而答案就是dp[0]; 用样例二举例,下面dp方程内直接用二进制表示,为了方便观察,我们用最高位表示第一张卡片(P1=0.1),最低位表示第n张卡片(P2=0.4)  dp[01]  = (dp[01]+ 1)* P + (dp[11]+1) *P2  //其中P表示吃不...
分类:其他好文   时间:2015-03-20 22:04:52    阅读次数:128
HDOJ 汉字统计
汉字统计 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 28458    Accepted Submission(s): 15579 Problem Description 统计给定文本文件中汉字的个数。   I...
分类:其他好文   时间:2015-03-20 22:04:10    阅读次数:144
代码重构的时机与要点
重构最好的时机是在task结束的时候,否则总有这样那样的“不应该”和资源浪费。 不重构很多时候伤害的是程序员自己,相当于放弃了宝贵的反思学习和锻炼写出简洁代码的机会。...
分类:其他好文   时间:2015-03-20 22:02:14    阅读次数:151
Leetcode: Valid Parentheses
题目: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all valid...
分类:其他好文   时间:2015-03-20 22:03:10    阅读次数:125
Pascal's Triangle
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] #include #include #inc...
分类:其他好文   时间:2015-03-20 22:01:40    阅读次数:118
第三章SignalR在线聊天例子
第三章SignalR在线聊天例子          本教程展示了如何使用SignalR2.0构建一个基于浏览器的聊天室程序。你将把SignalR库添加到一个空的Asp.Net Web应用程序中,创建用于发送消息到客户端的集线器(Hubs)类,创建一个Html页面让用户在该页面上发送和接收聊天信息。对于如何在MVC5环境中创建这个聊天室程序,请参阅GettingStarted with Sig...
分类:其他好文   时间:2015-03-20 22:03:38    阅读次数:159
LeetCode --- 71. Simplify Path
题目链接:Simplify Path Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" Corner Cases: Did you consider the ca...
分类:其他好文   时间:2015-03-20 22:00:16    阅读次数:168
LeetCode --- 72. Edit Distance
题目链接:Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations pe...
分类:其他好文   时间:2015-03-20 22:02:24    阅读次数:119
解决fatal error: sys/system_properties.h: No such file or directory compilation terminated.
编译的异常log: system/core/include/cutils/properties.h:22:35: fatal error: sys/system_properties.h: No such file or directory compilation terminated. make[1]: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/...
分类:其他好文   时间:2015-03-20 22:00:56    阅读次数:536
LeetCode --- 73. Set Matrix Zeroes
题目链接:Set Matrix Zeroes Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Follow up: Did you use extra space? A straight forward solution using O(mn) spa...
分类:其他好文   时间:2015-03-20 22:00:08    阅读次数:135
LeetCode --- 74. Search a 2D Matrix
题目链接:Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The ...
分类:其他好文   时间:2015-03-20 22:02:42    阅读次数:136
LeetCode Rotate Array
Rotate Array Total Accepted: 12759 Total Submissions: 73112 My Submissions Question Solution Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,...
分类:其他好文   时间:2015-03-20 22:00:52    阅读次数:166
LeetCode --- 75. Sort Colors
题目链接:Sort Colors Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will u...
分类:其他好文   时间:2015-03-20 22:01:20    阅读次数:169
atitit.提升兼容性最佳实践 o9o
atitit.提升兼容性最佳实践 o9o.doc   1. Atitit.兼容性的“一加三”策略 1 2. 扩展表模式 1 3. 同时运行模式 1 3.1. 完美的后向兼容性 2 3.2. 虚拟机模式 2   1. Atitit.兼容性的“一加三”策略   “通过移除陈旧代码降低编译器维护成本,Java9 javac 将不再支持Java 1.5以及更早的代码。JDK9的“一加...
分类:其他好文   时间:2015-03-20 22:00:52    阅读次数:148
Struts2学习笔记
Struts2 学习 1.第一步:导入8个核心包a) commons-fileupload-1.3.1b) commons-io-2.2c) commons-lang3-3.2d) freemarker-2.3.19e) javassist-3.11.0.GAf) ognl-3.0.6g) str....
分类:其他好文   时间:2015-03-20 22:00:03    阅读次数:130
CentOs文件实时同步
1,生成数据序2,创建测试同步目录--exclude=排除目录,--include=包括目录,--delete=源主机删除,目标主机也删除lsof -i:8080 端口对应的进程信息;数据目录镜像备份 remote sync;
分类:其他好文   时间:2015-03-20 21:57:24    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!