Today, I spent some time on learning how to program using C programming language, and I now have some thoughts to share. Firstly, I found it very bo.....
分类:
其他好文 时间:
2014-10-17 01:10:03
阅读次数:
284
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionGive two positive integers a and b, please help us calculate a*b.InputThe first line of t...
分类:
其他好文 时间:
2014-10-16 14:06:42
阅读次数:
135
题目链接:Uva 552思路: 时间限制为3s,数据较小,使用深度搜索查找所有的解。代码:#include #include using namespace std;const int MAX_N = 20;int n;int A[MAX_N], vis[MAX_N];int is_prime( ....
分类:
其他好文 时间:
2014-10-16 03:52:51
阅读次数:
211
题目大意:给你n个点然后让你求出去掉一条边之后所形成的最小生成树。
比较基础的次小生成树吧。。。先prime一遍求出最小生成树,在dfs求出次小生成树。
Install Air Conditioning
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)
Total ...
分类:
其他好文 时间:
2014-10-15 21:53:21
阅读次数:
301
原文出自:http://ttitfly.iteye.com/blog/1364671. 以一个算术运算为例,传统做法为:java 代码package org.common; public class Calculate { public String getResu...
分类:
编程语言 时间:
2014-10-15 13:17:30
阅读次数:
214
题目大意:T组数据,对于输入的N,若N为素数,输出“Prime”,否则输出N的最小素因子
思路:因为N的规模为2^54所以普通的素性判断果断过不了。要用Miller Rabin素数测试来做。
而若N不为素数,则需要对N进行素因子分解。因为N为大数,考虑用Pollar Rho整数分解来做。...
分类:
其他好文 时间:
2014-10-15 12:49:30
阅读次数:
225
Problem Description
A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first...
分类:
其他好文 时间:
2014-10-14 23:41:13
阅读次数:
266
sqwswwEEEeUntitled Document 复习提纲 stereographic projection (definition and the way to find a projecting point) calculate square root for a given complex number triangle inequality differentiatio...
分类:
其他好文 时间:
2014-10-14 14:01:29
阅读次数:
412
题目链接Dreamoon loves summing up something for no reason. One day he obtains two integersaandboccasionally. He wants to calculate the sum of allniceinteg...
分类:
其他好文 时间:
2014-10-13 23:10:27
阅读次数:
221
Largest prime factor
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 7009 Accepted Submission(s): 2482
Problem Description
Every...
分类:
其他好文 时间:
2014-10-13 13:10:47
阅读次数:
207