码迷,mamicode.com
首页 >  
搜索关键字:one discrete length    ( 47106个结果
poj1258 最小生成树 普林姆
Agri-Net Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 36780   Accepted: 14825 Description Farmer John has been elected mayor of his town! One of his campa...
分类:其他好文   时间:2014-07-22 23:04:15    阅读次数:229
codeforces Towers 题解
Little Vasya has received a young builder’s kit. The kit consists of several wooden bars, the lengths of all of them are known. The bars can be put one on the top of the other if their lengths are the...
分类:其他好文   时间:2014-07-22 23:01:53    阅读次数:323
【LeetCode】- Length of Last Word(最后一个单词的长度)
[ 问题: ] Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. [...
分类:其他好文   时间:2014-07-22 23:01:35    阅读次数:331
UVA之10361 - Automatic Poetry
Problem I Automatic Poetry Input: standard input Output: standard output Time Limit: 2 seconds Memory Limit: 32 MB   “Oh God”, Lara Croft exclaims, “it’s one of these dumb rid...
分类:其他好文   时间:2014-05-02 22:51:52    阅读次数:352
Chap5: question: 29 - 31
29:数组中出现次数超过一半的数字 方法a. 排序取中 O(nlogn) 方法b. partition 函数分割找中位数 >=O(n) 方法 c. 设计数变量,扫描一遍。 O(n)#include int findNumber(int data[], unsigned length){/* if(c...
分类:其他好文   时间:2014-05-02 19:47:41    阅读次数:535
[leetcode] Best Time to Buy and Sell Stock
Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie...
分类:其他好文   时间:2014-05-02 00:37:20    阅读次数:349
桶排序
1 //桶排序思想 2 //假如要排序的是数字是 2 4 5 5 5 8 8 9 1 1 3 #include 4 #define length 10 5 int main() 6 { 7 //数组元素值全部初始化为0 8 int array[length]={0}; 9 ...
分类:其他好文   时间:2014-05-01 22:19:46    阅读次数:342
JS 字符unicode转换函数
/**js Unicode编码转换*/vardecToHex =function(str) {varres=[];for(vari=0;i < str.length;i++) res[i]=("00"+str.charCodeAt(i).toString(16)).slice(-4);return"...
分类:Web程序   时间:2014-05-01 19:36:51    阅读次数:427
Recursion
RecursionIt is legal for one function to call another; it is also legal for a function to call itself. It may not be obvious why what is a good thing,...
分类:其他好文   时间:2014-05-01 18:40:44    阅读次数:302
[ACM] poj 1700 Crossing River (经典过河问题)
Crossing River Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10212   Accepted: 3855 Description A group of N people wishes to go across a river with only one...
分类:其他好文   时间:2014-04-30 22:21:38    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!