能量释放CH Round #45 - alan有一些陷阱 III题目描述 alan得到一块由个能量晶体构成的矿石,对于矿石中的每一个能量晶体,如果用化学物质刺激某一个能量晶体,就能使它释放能量。 它的能量释放强度与晶体本身的能量值以及能量晶体的位置有关。 为了方便研究,alan做了如下的定义。...
分类:
其他好文 时间:
2014-08-06 21:59:42
阅读次数:
244
Ignatius and the Princess III
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12639 Accepted Submission(s): 8929
Problem Descriptio...
分类:
其他好文 时间:
2014-08-04 17:53:07
阅读次数:
288
问题:罗马数字变为整数class Solution {public: int romanToInt(string s) { char c[10][10][10]={{"0","I","II","III","IV","V","VI","VII","VIII","IX"},{"0"...
分类:
其他好文 时间:
2014-08-01 23:01:02
阅读次数:
209
问题:将数字转化为罗马数字分析:将所有的数字打表出来class Solution {public: string intToRoman(int num) { char c[10][10][10]={{"0","I","II","III","IV","V","VI","VII","...
分类:
其他好文 时间:
2014-08-01 10:32:21
阅读次数:
215
题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=2122 最小生成树问题,可采用Kruskal算法,贪心策略,每次选取无向带权图的最短边,并把两端点用并查集的方式添加到一个集合内。 1 #include 2 #include 3 #include 4.....
分类:
其他好文 时间:
2014-07-31 16:28:27
阅读次数:
162
题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com....
分类:
编程语言 时间:
2014-07-30 05:35:13
阅读次数:
260
http://acm.hdu.edu.cn/showproblem.php?pid=1028
整数划分问题。
第一道母函数。。。
小于等于n的整数共有n个,1,2......n,每个数都有无限多个,对于整数1,它所对应的母函数为(1+x+x^2+...+x^k+...),整数2对应的母函数为(1+x^2+X^4+...+x^(2*k)+...),整数3对应的母函数为(1+x^...
分类:
其他好文 时间:
2014-07-28 00:16:19
阅读次数:
279
Ignatius and the Princess III
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12521 Accepted Submission(s): 8838
Problem Descript...
分类:
其他好文 时间:
2014-07-26 02:21:36
阅读次数:
214
汉诺塔III
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 9235 Accepted Submission(s): 4125
Problem Description
约19世纪末,在欧州的商店中出售一种智...
分类:
其他好文 时间:
2014-07-26 02:03:16
阅读次数:
250
2坑,3次WA。1.判断重边取小。2.自边舍去。(个人因为vis数组忘记初始化,WA了3次,晕死!!) 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 ...
分类:
其他好文 时间:
2014-07-23 14:59:06
阅读次数:
226