注意java不要有包名(并且严格按照输出,一个换行符都不能少):import
java.math.BigInteger;import java.util.Scanner;public class Main { public static
void main(String[] args) { ...
分类:
其他好文 时间:
2014-05-16 08:05:41
阅读次数:
331
CoinsTime Limit: 2000/1000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
6450Accepted Submission(s): 2628Problem Descr...
分类:
其他好文 时间:
2014-05-16 05:43:54
阅读次数:
293
MatrixTime Limit: 2000/1000 MS (Java/Others)Memory
Limit: 32768/32768 K (Java/Others)Total Submission(s): 1394Accepted
Submission(s): 758Problem Descr...
分类:
其他好文 时间:
2014-05-16 05:32:21
阅读次数:
332
SDUT集训计划假设已有C/C++/JAVA中任何一门程序设计语言基础,熟练掌握基本语法。Step1:入门hdu——water~,刷完Step2:数据结构——课本算法代码熟敲。数据结构需要掌握的内容(数据结构C语言版严蔚敏|吴伟民):第1章绪论算法和算法分析(时间复杂度分析和空间复杂度分析)第2章线...
分类:
其他好文 时间:
2014-05-16 05:25:47
阅读次数:
371
http://acm.hdu.edu.cn/showproblem.php?pid=1558先判断线段相交,然后用并查集合并。 1 #include 2
#include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7 i...
分类:
其他好文 时间:
2014-05-16 05:18:02
阅读次数:
353
错了29遍,终成正果。。。。。
根据题意,很容易的可以想到容斥。
然后的问题就是如何求
sum(n)=1^4+2^4+3^4+....+n^4;
有三种道路:
很显然:1^4+2^4+3^4+....+n^4=(n^5)/5+(n^4)/2+(n^3)/3-n/30;
则1,用java的大数去敲这个的代码。
2,用c++敲,但是用到分数取模,求逆元。
3,用c++敲,但是不用这...
分类:
其他好文 时间:
2014-05-15 06:36:06
阅读次数:
328
Problem Description
The new semester begins! Different kinds of student societies are all trying to advertise themselves, by giving flyers to the students for introducing the society. However, due ...
分类:
其他好文 时间:
2014-05-15 03:57:24
阅读次数:
311
http://acm.hdu.edu.cn/showproblem.php?pid=4635问:最多加多少条边,使得原图不是强连通图正向考虑有困难,不妨反向思考,既最少去掉几条边使得原图不是强连通。总边数sum=n*(n-1)时肯定是强连通,已经给了m条边,sum-=m这时把已经强连通的部分进行缩点...
分类:
其他好文 时间:
2014-05-14 13:37:36
阅读次数:
335
观察可以发现,0,1,2,……,n结尾的分组中,maxsum a[0] = a[0]maxsum
a[1] = max( a[0] + a[1] ,a[1]) = max( maxsum a[0] + a[1] ,a[1])maxsum a[2] =
max( max ( a[0] + a[1] +...
分类:
其他好文 时间:
2014-05-14 08:38:58
阅读次数:
323
题意:给你 n 个数,m个询问(c,x,y)
c==0 把x,y区间的值变为原来的平方根(向下取整)
c==1 计算x,y区间的和。
利用1的开方永远为1剪枝。。
#include
#include
#include
#include
//#include
#include
#include
#include
#include
#include
#include...
分类:
其他好文 时间:
2014-05-13 15:50:04
阅读次数:
338