码迷,mamicode.com
首页 >  
搜索关键字:positive    ( 2430个结果
【leetcode】First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru...
分类:其他好文   时间:2014-07-22 22:52:33    阅读次数:166
POJ 2739 Sum of Consecutive Prime Numbers
?? Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 18782   Accepted: 10308 Description Some positive integers can be represen...
分类:其他好文   时间:2014-07-17 19:15:16    阅读次数:260
leetcode First Missing Positive hashset简单应用
1 public class Solution { 2 public int firstMissingPositive(int[] A) { 3 HashSet hash=new HashSet(); 4 int count=0; 5 int...
分类:其他好文   时间:2014-07-15 08:58:16    阅读次数:239
(素数求解)I - Dirichlet's Theorem on Arithmetic Progressions(1.5.5)
Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Description If a and d are relatively prime positive integers, the arithmetic sequence begin...
分类:其他好文   时间:2014-07-13 18:53:13    阅读次数:251
poj 1579 Moving Tables(水)
DescriptionThe Recaman's sequence is defined by a0 = 0 ; for m > 0, am= am?1? m if the rsulting amis positive and not already in the sequence, otherwi...
分类:其他好文   时间:2014-07-11 11:12:10    阅读次数:201
HDU 1013 Digital Roots 题解
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summed and the process ...
分类:其他好文   时间:2014-07-08 14:12:32    阅读次数:226
HDU--Elevator
Elevator Time Limit: 1000ms   Memory limit: 32768K  有疑问?点这里^_^ 题目描述 The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers de...
分类:其他好文   时间:2014-07-06 10:52:11    阅读次数:188
素数判定 费马测试
;; Fermat's Little Theorem: ;; If N is a prime number and A is any positive integer less ;; than N, then A raised to the N-th power is congruent to A modulo N ;; Two numbers are said to be congruent...
分类:其他好文   时间:2014-07-06 09:05:22    阅读次数:158
Leetcode First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru...
分类:其他好文   时间:2014-07-05 18:37:04    阅读次数:188
Uva488 Triangle Wave
In this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency. Input and Output The input begins with a single positive integer on a line by i...
分类:其他好文   时间:2014-07-03 17:15:14    阅读次数:204
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!