- 博客(44)
- 资源 (2)
- 收藏
- 关注
原创 Golang slice 切片
package mainimport ( "fmt")func main() { s := make([]string, 10) fmt.Println(s) fmt.Println(len(s)) fmt.Println("--------------------------") s = append(s, "a") s = append(s, "a", "b") f
2015-07-02 09:04:49
627
原创 Golang 数组使用
package mainimport ( "fmt")func main() { var arr [10]int fmt.Println("初始值:", arr) fmt.Println("----------------------------") arr[5] = 1000 fmt.Println("赋值后:", arr) fmt.Println("---------
2015-07-02 08:44:36
4570
原创 Golang for循环
package mainimport ( "fmt")func main() { for i := 0 ; i < 10; i++{ fmt.Println(i) }}输出结果:0123456789golang中没有while 那么死循环我们可以这么用package mainimport ( "fmt")func main()
2015-07-02 08:33:33
997
原创 golang example Hello World
golang 第一句 输出Hello Worldpackage mainimport ( "fmt")func main() { fmt.Println("Hello World")}
2015-07-02 08:26:54
432
原创 免费馅饼
#include#include#include#includeusing namespace std;int map[100001][11]={0};int main(){ int n,case_point,time,i,j; while(scanf("%d",&n),n) { memset(map,0,sizeof(map)); int max_time=0;
2012-07-26 20:32:02
823
原创 免费馅饼
#include#include#include#includeusing namespace std;int map[100001][11]={0};int main(){ int n,case_point,time,i,j; //printf("%d",map[100][10]); while(scanf("%d",&n),n) { memset(map,0,
2012-07-26 20:27:50
806
原创 POJ 3278 Catch That Cow
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 30437 Accepted: 9390DescriptionFarmer John has been informed of the location of a fugiti
2012-07-19 10:13:07
456
原创 POJ3094-Quicksum解题报告
QuicksumTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10876 Accepted: 7489DescriptionA checksum is an algorithm that scans a packet of data and return
2012-07-17 20:23:21
775
原创 POJ3006-Dirichlet's Theorem on Arithmetic Progressions解题报告
Dirichlet's Theorem on Arithmetic ProgressionsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11749 Accepted: 5923DescriptionIf a and d are relatively p
2012-07-17 19:57:29
916
原创 POJ1083-Moving Tables解题报告
Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 20728 Accepted: 6814DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a
2012-07-17 19:10:47
549
原创 Problem 1010
Description给出数列A1;A2; : : : ;AN,并设 现要求把所有的Bi 算出来。 Input输入包含多组测试数据。对于每组数据,第1 行,1 个整数N(1 行,N 个整数A1,A2, ......,AN(1 Output对于每组数据,输出一行,N 个整数用空格分隔,表示算出的B1,B2, ....,BN。
2012-07-17 15:05:51
484
原创 J - Transmitters解题报告
J - TransmittersTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIn a wireless network with multiple transmitters sending on th
2012-04-22 19:48:30
490
原创 D - Area解题报告
D - AreaTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionYou are going to compute the area of a special kind of polygon. One ve
2012-04-22 19:47:17
941
原创 A - A hard puzzle解题报告
A - A hard puzzleTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1097Descriptionlcy gives a hard puzzle to feng5166,lwg,JGS
2012-04-18 18:35:44
1089
原创 E - I Love You Too解题报告
E - I Love You TooTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2816DescriptionThis is a true story. A man showed his lov
2012-04-18 18:35:07
965
原创 H - Climbing Worm解题报告
H - Climbing WormTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1049DescriptionAn inch worm is at the bottom of a well n i
2012-04-18 18:34:26
609
原创 简单栈
Problem 1033Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 132 Solved: 43[Submit][Status][Web Board]DescriptionOur innlab have a dog,this dog is God like~~so he said Stack is so easy, s
2012-04-15 21:41:53
462
原创 折线分割平面问题
Problem 1027Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 62 Solved: 35[Submit][Status][Web Board]Description我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多
2012-04-14 15:25:39
559
原创 L - Pyramids
L - PyramidsTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionRecently in Farland, a country in Asia, a famous scientist Mr. Log
2012-04-11 19:01:58
601
原创 利用欧拉四面体公式求任意三棱锥的体积
OA=20.81,OB=23.9,OB=14.98,AB=15.38,BC=18.03,CA=25.37 将a=OA,b=OB,c=OC,l=AB,m=BC,n=CA 带入下式计算,利用三个棱长求体积有个公式叫欧拉四面体公式: V=sqrt((4*a*a*b*b*c*c-a*a*(b*b+c*c-m*m)*(b*b+c*c-m*m) -b*b*(c*c+a*a-n*n)*(c*c+a*
2012-04-11 18:29:14
2833
原创 用迭代法求
Problem 1018Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 172 Solved: 126[Submit][Status][Web Board]Description用迭代法求 。求平方根的迭代公式为: X[n+1]=1/2(X[n]+a/X[n]) 要求前后两次求出的得差的绝对值少于0.00001。 输出保留
2012-04-10 17:20:49
884
原创 用筛法求之N内的素数
Problem 1019Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 668 Solved: 114[Submit][Status][Web Board]Description用筛法求之N内的素数。(N InputNOutput0~N的素数Sample Input100Sample
2012-04-10 17:13:38
1808
原创 Problem 1003
Problem 1003Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 94 Solved: 27[Submit][Status][Web Board]Description字符串的输入输出处理。Input第一行是一个正整数N,最大为100。之后是多行字符串(行数大于N), 每一行字符串可能含有空格,字符数不超过
2012-04-10 16:31:12
791
原创 I Think I Need a Houseboat解题报告
I Think I Need a HouseboatTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 68120 Accepted: 28722DescriptionFred Mapper is considering purchasing some
2012-04-09 19:13:13
467
原创 Hangover解题报告
HangoverTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 76928 Accepted: 36660DescriptionHow far can you make a stack of cards overhang a table? If y
2012-04-09 18:51:25
536
原创 Quicksum解题报告
QuicksumTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10341 Accepted: 7132DescriptionA checksum is an algorithm that scans a packet of data and re
2012-04-09 17:35:18
465
原创 N!解题报告
N!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30093 Accepted Submission(s): 8264Problem DescriptionGiven an integer N(0
2012-04-07 13:22:48
463
原创 u Calculate e解题报告
u Calculate eTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16844 Accepted Submission(s): 7307Problem DescriptionA simple ma
2012-04-07 13:01:40
565
原创 输出到文件
#include #include using namespace std; int main() { int i,j,o,p; ofstream outfile("abcd.txt"); for(i=0;i<=9;i++) for(j=0;j<=9;j++) for(o=0;o<=9;o++) for(p=0;p<=9;p
2012-04-06 20:22:26
409
原创 C - Who's in the Middle(结题报告)
C - Who's in the MiddleTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2388DescriptionFJ is surveying his herd to find th
2012-04-05 19:36:00
789
原创 A - A+B(解题报告)
A - A+BTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1228Description读入两个小于100的正整数A和B,计算A+B.需要注意的是:A和B的每一位数字由对应的英文单词给出.
2012-04-05 19:34:58
461
原创 B - 反正切函数的应用解题报告
B - 反正切函数的应用Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription反正切函数可展开成无穷级数,有如下公式 (其中0 使用反正切函数计算PI是一种常用的方法。例如,最简单的计算PI的方
2012-03-28 21:00:05
747
原创 A - 取石子游戏(解题报告)
A - 取石子游戏Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可
2012-03-28 19:35:12
596
原创 K - Goldbach's Conjecture解题报告
K - Goldbach's ConjectureTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIn 1742, Christian Goldbach, a German amateur mathema
2012-03-28 17:20:51
565
原创 J - Perfect Pth Powers解题报告
J - Perfect Pth PowersTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionWe say that x is a perfect square if, for some integer b
2012-03-26 20:59:40
598
原创 A - Can you find it?解题报告
A - Can you find it?Time Limit:3000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionGive you three sequences of numbers A, B, C, then we give yo
2012-03-22 18:58:00
543
原创 Let the Balloon Rise
Let the Balloon RiseTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 37885 Accepted Submission(s): 13036Problem DescriptionCon
2012-03-20 15:43:22
308
原创 Max Sum
Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 70077 Accepted Submission(s): 16106Problem DescriptionGiven a sequence
2012-03-20 15:17:26
319
原创 A + B Problem II
A + B Problem IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 103847 Accepted Submission(s): 19694Problem DescriptionI have
2012-03-20 13:03:12
441
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人