Description有N个正整数,需要从中选出一些数,使这些数的和最大。若两个数a,b同时满足以下条件,则a,b不能同时被选1:存在正整数C,使a*a+b*b=c*c2:gcd(a,b)=1 这道题做出来还是比较有成就感的..毕竟是自己独立的思考过程 首先可以对于选或不选,我们可以建立经典最小.....
分类:
其他好文 时间:
2015-04-18 14:27:15
阅读次数:
185
既然这个是资格赛, 时间也比较充裕, 我就讲解一下我做题的过程
Time Limit:2000ms
Case Time Limit:1000ms
Memory Limit:256MB
Description
Given a string, calculate the number of subsequences that are palindrome. ...
分类:
其他好文 时间:
2015-04-18 13:10:38
阅读次数:
162
Problem Description
Arcueid likes nya number very much.
A nya number is the number which has exactly X fours and Y sevens(If X=2 and Y=3 , 172441277 and 47770142 are nya numbers.But 14777 is not a n...
分类:
其他好文 时间:
2015-04-18 13:09:31
阅读次数:
155
题目: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...
分类:
其他好文 时间:
2015-04-18 12:47:09
阅读次数:
145
题目:Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12902 Accepted Submission(s): 5845Problem DescriptionGiven two sequences o...
分类:
其他好文 时间:
2015-04-18 11:34:23
阅读次数:
121
二进制的状态压缩。比如A集合里面有{1,5,7}那么就表示为1010001。B集合有{3,4},二进制表示1100。A|B=1011101。按照这样的思路 可以用01背包 把所有的组合全部求出来。#include#include#include#includeusing namespace std;...
分类:
其他好文 时间:
2015-04-18 08:38:15
阅读次数:
136
数学的主题是数和形,它们是最基础、最久远的数学概念。克罗内克说过:“上帝创造了自然数,其它都是人的作品”,所以我们选择从数开始说起。数论(Number Theory)专门研究自然数(或整数),这个看似无意义的智力游戏,其实不光是数学家们的思维乐园,它更是孕育新思想、新方法的肥沃土壤。即使我们已经.....
分类:
其他好文 时间:
2015-04-18 01:03:54
阅读次数:
587
Problem StatementCharlie has N pancakes. He wants to serve some of them for breakfast. We will number the pancakes 0 through N-1. For each i, pancake ...
分类:
其他好文 时间:
2015-04-18 01:00:11
阅读次数:
265
1、错误描述
org.hibernate.exception.GenericJDBCException: error executing work
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hib...
分类:
数据库 时间:
2015-04-17 23:50:18
阅读次数:
309
题目:Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated ...
分类:
其他好文 时间:
2015-04-17 23:48:42
阅读次数:
140