码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
[LC] 243. Shortest Word Distance
Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. Example:Assume that words = ["p ...
分类:其他好文   时间:2019-11-18 09:28:36    阅读次数:56
LeetCode_389. Find the Difference
389. Find the Difference Easy Easy Easy Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling s ...
分类:其他好文   时间:2019-11-18 09:22:52    阅读次数:65
[LC] 215. Kth Largest Element in an Array
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example ...
分类:其他好文   时间:2019-11-18 09:20:14    阅读次数:59
[Atcoder2292] Division into Two
题目大意 给定n个不同的整数,求将它们分成两个集合X,Y,并且X集合中任意两个数的差 =A,Y集合中任意两个数的差 =B的方案数。 样例输入 5 3 7 1 3 6 9 12 样例输出 5 解析 不妨设$A B$,那么考虑如何动态规划。设$f[i]$表示第一个集合最后选择的数是i时的方案数。只用枚举 ...
分类:其他好文   时间:2019-11-18 00:03:49    阅读次数:61
agc040B - Two Contests
题意:n(10^5)个问题,每个问题能被[li,ri]的人解决,要把n个问题分到两次测试中,使AK的人最多,测试至少包含一个问题。 找到最小的r(rmin)和最大的l(lmax),然后考虑两种情况, 1:rmin和lmax在一场测试中,显然此时答案为max(rmin-lmax,0)+除端点包含这两个 ...
分类:其他好文   时间:2019-11-17 23:59:14    阅读次数:137
leetcode-1-Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:其他好文   时间:2019-11-17 13:09:53    阅读次数:72
Python3 常用的几个内置方法
max/min()/filter()/map/sorted()/reduce() ...
分类:编程语言   时间:2019-11-17 12:54:01    阅读次数:75
108. Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d ...
分类:其他好文   时间:2019-11-16 21:49:38    阅读次数:70
Educational Codeforces Round 76 (Rated for Div. 2) (A-F)题解
A.Two Rival Students 小的位置向左走,大的位置向右走直到走到最左或最右端或者x为0。 include using namespace std; mapmp; int main() { int t; scanf("%d",&t); while(t ) { mp.clear(); i ...
分类:其他好文   时间:2019-11-16 19:16:27    阅读次数:106
OpenGL Two (Triangle__EBO)
冠冕堂皇的引言 之前已经画了一个憨憨的三角形。如果是画由两个三角形组成的四边形的话...... 此时就会出现一个问题,我们指定 右下角 和 左上角 两次,就显得有一丝的多余。所以我们引入了 索引缓冲对象( Element Buffer Object , EBO )( 也叫IBO,Index Buff ...
分类:其他好文   时间:2019-11-16 17:59:44    阅读次数:78
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!