码迷,mamicode.com
首页 >  
搜索关键字:nearly prime numbers    ( 9679个结果
rock crushing plant in Saudi Arabia
we have nearly a decade of stationary construction waste crushing equipment installation experience, the production of the crusher, efficient fine cru...
分类:其他好文   时间:2014-06-18 16:22:41    阅读次数:264
Two Sum
题目 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the...
分类:其他好文   时间:2014-06-18 12:05:44    阅读次数:244
【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-06-18 11:41:52    阅读次数:156
Next Permutation
题目 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the low...
分类:其他好文   时间:2014-06-16 18:48:33    阅读次数:170
leetcode--Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl...
分类:其他好文   时间:2014-06-15 21:21:17    阅读次数:152
uva 10006 数论入门题
这是一个入门的数论题目 , 只需要简单的找素数和快速幂取模 题意:输入一个数 n , 如果这个数是非素数 , 问是不是 这个2~n-1区间的所有数都满足 ? 解法:由于数据量不大 , 可以直接暴力求解 解法1: 暴力求解 #include #include #include using namespace std; long long prime[65010]; ...
分类:其他好文   时间:2014-06-15 15:26:51    阅读次数:215
[LeetCode] Combinations [38]
题目 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],...
分类:其他好文   时间:2014-06-15 14:10:54    阅读次数:239
[leetcode]Add Two Numbers @ Python
原题地址:https://oj.leetcode.com/problems/add-two-numbers/题意:You are given two linked lists representing two non-negative numbers. The digits are stored i...
分类:编程语言   时间:2014-06-15 00:40:44    阅读次数:328
Leetcode:Triangle
Decription:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, gi...
分类:其他好文   时间:2014-06-14 19:46:12    阅读次数:251
[LeetCode] Decode Ways [33]
题目 A message containing letters from A-Z is being encoded to numbers using the following mapping: 原题链接(点我) 解题思路及代码; 解码方法数量问题。英文26个字母对应1到26,给一串数字,问翻译为字母有多少种方法? 这个题第一思路是想到使用组合排列的方法,穷举所有的可能。很好,写出如下代码... 但是提交后出来的结果是超时。 再想想,使用动态规划的方法来做。 对于串s[0...i]的解码数量应该和s[0.....
分类:其他好文   时间:2014-06-13 20:44:04    阅读次数:292
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!