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
题目: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
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
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
题目大意:给定一个序列,选定一段区间的亦或和,输出最大和最小。
解题思路:最大很简单,对所有前缀建立字典树,然后尽量往反向走;最小则需要往正向走,并且向正向走的时候要扣
除自己本身。
#include
#include
#include
using namespace std;
const int...
分类:
其他好文 时间:
2014-10-31 01:18:57
阅读次数:
227
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
# 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
# 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...
分类:
其他好文 时间:
2014-10-30 15:27:42
阅读次数:
208
# 题目 > 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