Minimum palindrome
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 780 Accepted Submission(s): 353
Problem Description
Setting p...
分类:
其他好文 时间:
2014-08-24 18:07:43
阅读次数:
176
暴力+构造
If r?-?l?≤?4 we can all subsets of size not greater than k.
Else, if k?=?1, obviously that answer is l. If k?=?2,
answer is 1, because xor of numbers 2x and 2x?+?1 equls 1.
If k?≥...
分类:
其他好文 时间:
2014-08-24 11:40:22
阅读次数:
233
Palindrome
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 52966
Accepted: 18271
Description
A palindrome is a symmetrical string, that is, a string read i...
分类:
其他好文 时间:
2014-08-23 23:03:21
阅读次数:
569
Add Two Numbers
Total Accepted: 20255 Total
Submissions: 88115My Submissions
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order a...
分类:
其他好文 时间:
2014-08-23 21:40:01
阅读次数:
200
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.....
分类:
其他好文 时间:
2014-08-23 21:37:41
阅读次数:
199
Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioni...
分类:
其他好文 时间:
2014-08-23 21:34:11
阅读次数:
288
#include void main() { int a[10]; int i,j,t; printf("input 10 numbers:\n"); for(i=0;ia[i+1]) /*相邻两个数比较,想降序只要改成a[i]<a[i+1]*/ { t=a[i]; a[i]=a[i+1]...
分类:
编程语言 时间:
2014-08-23 17:32:31
阅读次数:
157
Triangle
Total Accepted: 16109 Total
Submissions: 60327My Submissions
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row...
分类:
其他好文 时间:
2014-08-23 16:54:11
阅读次数:
253
Consider this sequence {1, 2, 3, … , N}, as a initial sequence of firstN natural numbers. You can rearrange this sequence in many ways. Therewill be
N! different arrangements. You have to calculate t...
分类:
其他好文 时间:
2014-08-23 15:27:01
阅读次数:
202
Remove Duplicates from Sorted List II
Total Accepted: 17137 Total
Submissions: 69046My Submissions
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only d...
分类:
其他好文 时间:
2014-08-23 14:00:40
阅读次数:
187