码迷,mamicode.com
首页 >  
搜索关键字:intersection of two    ( 11974个结果
【LeetCode】- Merge Sorted Array (合并有序数组)
[ 问题: ] Given two sorted integer arrays A and B, merge B into A as one sorted array. 直译:给定两个排好序的整形数组,将数组B合并到数组A,形成一个新的有序数组。...
分类:其他好文   时间:2014-08-28 14:53:19    阅读次数:214
Leetcode: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 ha...
分类:其他好文   时间:2014-08-28 13:04:59    阅读次数:162
codechef Sums in a Triangle题解
Let's consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc....
分类:其他好文   时间:2014-08-28 13:03:29    阅读次数:218
UVA - 12293 Box Game (规律)
Description   Box Game  There are two identical boxes. One of them contains n balls, while the other box contains one ball. Alice and Bob invented a game with the boxes and bal...
分类:其他好文   时间:2014-08-28 09:41:09    阅读次数:189
NEFU 118
其实一道公式题:n!中素数i的幂为:[n/i]+[n/i^2]+[n/i^3]+[n/i^4]+......#include #include #include using namespace std;long long n;int main(){ long long two,five; int t...
分类:其他好文   时间:2014-08-28 09:38:59    阅读次数:131
杭电1279 Stone Game(经典博弈)
Stone Game Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2539    Accepted Submission(s): 741 Problem Description This game is a two-p...
分类:其他好文   时间:2014-08-27 22:03:38    阅读次数:244
HDU-3085-Nightmare Ⅱ(双向BFS)
Problem Description Last night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big maze separately. More terribly, there are two ghosts in the maz...
分类:Web程序   时间:2014-08-27 22:03:18    阅读次数:255
数论 : 高精度 --- UVa 10183 : How Many Fibs ?
How many Fibs?DescriptionRecall the definition of the Fibonacci numbers:f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n>=3) Given two numbers a and b, calcul...
分类:其他好文   时间:2014-08-27 20:17:48    阅读次数:208
leetcode之Median of Two Sorted Arrays
Median of Two Sorted Arrays There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (...
分类:其他好文   时间:2014-08-27 14:47:18    阅读次数:148
leetcode之Gray Code
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 number of bits in the cod...
分类:其他好文   时间:2014-08-27 14:45:48    阅读次数:236
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!