码迷,mamicode.com
首页 >  
搜索关键字:consecutive numbers    ( 8082个结果
打印蛇形矩阵的java实现
smartOJ[NOIP1995P3]importjava.util.*;publicclassMain{ publicstaticvoidmain(String[]args){ Stringstr=null; Scannerscanner=newScanner(System.in); intn=scanner.nextInt(); int[][]numbers=newint[n][n]; boolean[][]isE=newboolean[n][n]; intx=0,y=n-1,k..
分类:编程语言   时间:2014-11-02 00:45:49    阅读次数:198
[Leetcode] Two Sum (C++)
题目: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...
分类:编程语言   时间:2014-11-02 00:36:25    阅读次数:215
DFS [NYOJ 43] 24 Point game
24 Point game时间限制:3000ms | 内存限制:65535KB难度:5描述There is a game which is called 24 Point game.In this game , you will be given some numbers. Your task is...
分类:其他好文   时间:2014-11-01 18:59:08    阅读次数:235
[Leetcode] 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 nu...
分类:其他好文   时间:2014-11-01 06:12:44    阅读次数:273
LightOJ 1269 - Consecutive Sum(字典树)
题目链接:LightOJ 1269 - Consecutive Sum 题目大意:给定一个序列,选定一段区间的亦或和,输出最大和最小。 解题思路:最大很简单,对所有前缀建立字典树,然后尽量往反向走;最小则需要往正向走,并且向正向走的时候要扣 除自己本身。 #include #include #include using namespace std; const int...
分类:其他好文   时间:2014-10-31 01:18:57    阅读次数:227
HDU2141【hash】
Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, whic...
分类:其他好文   时间:2014-10-30 20:42:05    阅读次数:139
Euler Project question 34 in python way
# 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.# Find the sum of all numbers which are equal to the sum of the factorial of their dig...
分类:编程语言   时间:2014-10-30 19:03:14    阅读次数:209
Euler Project question 30 in python way
# Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:# 1634 = 14 + 64 + 34 + 44# 8208 = 84 + 24...
分类:编程语言   时间:2014-10-30 18:40:45    阅读次数:183
hdu_1003_Max Sum hdu_1058_Humble Numbers hdu_1059_Dividing
hdu_1003_Max Sum hdu_1058_Humble Numbers hdu_1059_Dividing...
分类:其他好文   时间:2014-10-30 15:27:42    阅读次数:208
[LeetCode] Longest Consecutive Sequence 求解
# 题目 > Given an unsorted array of integers, find the length of the longest consecutive elements sequence. > For example, > Given [100, 4, 200, 1, 3, 2], > The longest consecutive elements sequenc...
分类:其他好文   时间:2014-10-30 12:01:47    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!