码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
Segment
Description Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at...
分类:其他好文   时间:2014-11-04 22:55:12    阅读次数:258
[LeetCode]Two Sum 【Vector全局指针的使用】
无序数组返回两个元素和为给定值的下标。 tricks:无序、返回下标增序、返回的是原始数组的下标。 vector*pa; bool cmp(int x,int y){ return (*pa)[x]<(*pa)[y]; } class Solution { public: vector twoSum(vector &a, int t) { int n=a...
分类:其他好文   时间:2014-11-04 22:53:47    阅读次数:173
[ACM] SDUT 2886 Weighted Median (省赛最悲剧的一道题)
Weighted Median Time Limit: 2000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 For n elements x1,?x2,?...,?xn with positive integer weights w1,?w2,?...,?wn. The weighted median is the...
分类:其他好文   时间:2014-11-04 22:51:14    阅读次数:290
[LeetCode] Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100"思路:时间复杂度O(n), 空间复杂度O(1) 1 class Solution { 2 pub...
分类:其他好文   时间:2014-11-04 22:35:25    阅读次数:246
Linux_C dup()
1 /* 2 * stdinredir2.c 3 * shows two more methods for redirecting standard input 4 * use #define to set one or the other 5 */ 6 #include 7 #incl...
分类:系统相关   时间:2014-11-04 22:26:28    阅读次数:338
Leetcode | Gray code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total numb...
分类:其他好文   时间:2014-11-04 18:48:23    阅读次数:187
[LeetCode]Combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ]...
分类:其他好文   时间:2014-11-04 17:28:35    阅读次数:283
webrtc学习——RTCPeerConnection
TheRTCPeerConnectioninterface represents a WebRTC connection and handles efficient streaming of data between two peers.Warning: RTCPeerConnection and ...
分类:Web程序   时间:2014-11-04 17:07:02    阅读次数:335
POJ 3356-AGTC(区间DP)
AGTC Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10225   Accepted: 3949 Description Let x and y be two strings over some finite alphabet A. We would like...
分类:其他好文   时间:2014-11-04 15:07:36    阅读次数:219
POJ 2406 Power Strings(kmp)
Language: Default Power Strings Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 33335   Accepted: 13852 Description Given two strings a and b we define a...
分类:其他好文   时间:2014-11-04 15:02:45    阅读次数:128
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!