码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
SPOJ 15. The Shortest Path 堆优化Dijsktra
You are given a list of cities. Each direct connection between two cities has its transportation cost (an integer bigger than 0). The goal is to find the paths of minimum cost between pairs of cities....
分类:Web程序   时间:2014-10-05 01:29:57    阅读次数:289
HDU - 5017 Ellipsoid(模拟退火法)
Problem Description Given a 3-dimension ellipsoid(椭球面) your task is to find the minimal distance between the original point (0,0,0) and points on the ellipsoid. The distance between two points...
分类:其他好文   时间:2014-10-04 18:05:26    阅读次数:242
lreplace
Replacing an element of a list with another:% lreplace {a b c d e} 1 1 fooa foo c d eReplacing two elements of a list with three:% lreplace {a b c d e...
分类:其他好文   时间:2014-10-04 13:08:16    阅读次数:162
printf函数的多行写法
#include?<stdio.h> #include?<stdlib.h> int?main(void)?{ //?Method?One printf("Line-1"); printf("Line-1\n"); //?Method?Two printf("Line-2Line-2\n"); //?Method?Three printf("Li...
分类:其他好文   时间:2014-10-04 02:52:26    阅读次数:536
leetcode - Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. /** * Definition for singly-linked list. * struct ListNode { * int val; * Lis...
分类:其他好文   时间:2014-10-03 17:21:45    阅读次数:167
HDU - 5008 Boring String Problem (后缀数组+二分+RMQ)
Problem Description In this problem, you are given a string s and q queries. For each query, you should answer that when all distinct substrings of string s were sorted lexicographically, which ...
分类:其他好文   时间:2014-10-03 16:56:54    阅读次数:249
Card objects
There are fifty-two cards in a deck, each of which belongs to one of four suits and one of thirteen ranks. The suits are Spades, Hearts, Diamonds, and...
分类:其他好文   时间:2014-10-03 16:07:24    阅读次数:146
leetcode - Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * ...
分类:其他好文   时间:2014-10-03 15:40:04    阅读次数:186
leetcode - Balanced Binary Tree
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:其他好文   时间:2014-10-03 13:39:24    阅读次数:205
HDU-2857-Mirror and Light(计算几何)
Problem Description The light travels in a straight line and always goes in the minimal path between two points, are the basic laws of optics. Now, our problem is that, if a branch of light goes...
分类:其他好文   时间:2014-10-03 04:12:15    阅读次数:162
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!