码迷,mamicode.com
首页 >  
搜索关键字:number of islands    ( 27069个结果
[BestCoder Round #6] hdu 4981 Goffi and Median (水题)
Goffi and Median Problem Description A median in a sequence with the length of n is an element which occupies position number ?n+12? after we sort the elements in the non-decreasing order ...
分类:其他好文   时间:2014-08-25 11:55:34    阅读次数:159
projecteuler---->problem=36----Double-base palindromes
Problem 36 The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please...
分类:其他好文   时间:2014-08-25 10:06:04    阅读次数:198
UVA 10909 - Lucky Number(树状数组)
UVA 10909 - Lucky Number 题目链接 题意:问一个数字能否由两个lucky num构造出来,lucky num根据题目中的定义 思路:利用树状数组找前k大的方法可以构造出lucky num的序列,然后每次查找n,就从n / 2开始往下查找即可 代码: #include #include #include using namespace st...
分类:其他好文   时间:2014-08-24 23:52:53    阅读次数:423
[LeetCode] Combination Sum (bfs)
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeate...
分类:其他好文   时间:2014-08-24 23:34:33    阅读次数:259
[LeetCode] Combination Sum II (递归)
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:其他好文   时间:2014-08-24 23:29:33    阅读次数:176
LeetCode: Sum Root to Leaf Numbers
LeetCode: Sum Root to Leaf NumbersGiven a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is t...
分类:其他好文   时间:2014-08-24 20:41:33    阅读次数:175
题目1004:Median
题目描述: Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The median of two sequences is defined to be...
分类:其他好文   时间:2014-08-24 19:24:22    阅读次数:235
LeetCode:3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers....
分类:其他好文   时间:2014-08-24 19:14:43    阅读次数:211
备战ACM烂摊子
problem A#includeint a[500]={0};//素数大表 int main(){ int number; int anumber=0; int i=0; int flag=0; while(scanf("%d",&number)!=EOF) { if(anumber==0) .....
分类:其他好文   时间:2014-08-24 19:12:03    阅读次数:162
java 线程(三) :对象的共享
可见性:      我们希望确保一个线程修改了对象的状态后,其他线程能够看到发生的状态变化。      例:在没有同步的情况下共享变量 public class NoVisibility { private static boolean ready; private static int number; public static class Rea...
分类:编程语言   时间:2014-08-24 15:31:02    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!