题目:
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 ta...
分类:
其他好文 时间:
2014-06-28 08:17:11
阅读次数:
305
11105 - Semi-prime H-numbers
题目链接
题意:给定4 * n + 1的集合,在这个集合基础上求这个集合的集合素数,然后求出这个集合中,由两个集合素数相乘得到的数有几个。
思路:先筛出集合素数,然后暴力一下两两组合有多少个即可。
代码:
#include
#include
const int N = 1000005;
int vis[N...
分类:
其他好文 时间:
2014-06-28 07:47:24
阅读次数:
358
题目
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1],
...
分类:
其他好文 时间:
2014-06-27 23:53:21
阅读次数:
290
题目
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have the following permutations:
[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2],
and [3,2,1]....
分类:
其他好文 时间:
2014-06-27 23:48:51
阅读次数:
240
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
分类:
其他好文 时间:
2014-06-27 23:02:33
阅读次数:
258
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
分类:
其他好文 时间:
2014-06-27 11:47:58
阅读次数:
166
题目:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sing...
分类:
其他好文 时间:
2014-06-27 11:38:12
阅读次数:
207
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A
man, a plan, a canal: Panama" is a palindrome.
"race
a car" is no...
分类:
其他好文 时间:
2014-06-27 10:36:41
阅读次数:
183
题目链接:点击打开链接
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define N 5001000
#define mod 1000000007
#define he...
分类:
其他好文 时间:
2014-06-27 07:35:50
阅读次数:
178
1、错误描述
六月 26, 2014 10:44:49 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error
严重: Template processing error: "The only legal comparisons are between two numbers, two strings, or two dates.\nLeft...
分类:
其他好文 时间:
2014-06-27 07:21:12
阅读次数:
196