上一页 1 ··· 7 8 9 10 11
摘要: 题目链接:https://www.patest.cn/contests/gplt/L1-009 题目: 本题的要求很简单,就是求N个数字的和。麻烦的是,这些数字是以有理数“分子/分母”的形式给出的,你输出的和也必须是有理数的形式。 输入格式: 输入第一行给出一个正整数N(<=100)。随后一行按格式 阅读全文
posted @ 2018-03-28 13:29 Dillonh 阅读(599) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://113.240.233.2:8081/JudgeOnline/problem.php?id=1121 这个题看起来要多次使用bfs,其实只要换个思维就会发现这就是一个简单的bfs裸题。不要从P开始bfs,要从W开始bfs,然后到达P的话就将W与P间的距离加上,如果达到F的话, 阅读全文
posted @ 2018-03-20 12:24 Dillonh 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 本鶸鸡于本月10号参加了蔽校的选拔赛,成绩差的死,大部分的题都是赛后花了好长时间才补出来的,其中有些题还是靠QAQorz大佬帮忙才能解决,感谢Qls对我的帮助~接下来就附带上我的暴力题解,大佬们有更好的想法请一定要告诉我啊~ Problem A: 灾区重建 题目链接:http://113.240.2 阅读全文
posted @ 2018-03-15 00:27 Dillonh 阅读(420) 评论(2) 推荐(1) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1166 题目描述: 敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total S 阅读全文
posted @ 2018-03-02 22:03 Dillonh 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://projecteuler.net/problem=3 题目描述: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475 阅读全文
posted @ 2018-03-01 22:36 Dillonh 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://projecteuler.net/problem=2 题目描述: Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 阅读全文
posted @ 2018-03-01 19:06 Dillonh 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 欧拉项目链接:https://projecteuler.net/archives 题目链接:https://projecteuler.net/problem=1 题目描述:Ifwe list all the natural numbers below 10 that are multiples of 阅读全文
posted @ 2018-02-28 15:10 Dillonh 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 全错位重排 基本简介 一个人写了n封不同的信及相应的n个不同的信封,他把这n封信全都装错了信封,问都装错信封的装法有多少种? 解法: 将这n封信从1到n进行编号得到1、2、3……号码,同理将信封也从1到n进行编号,将n封信与信封错位的方法记作S。 1.当n=1时,由于只有1封信,所以无论如何都不会错 阅读全文
posted @ 2018-02-09 23:48 Dillonh 阅读(764) 评论(0) 推荐(0) 编辑
摘要: 斯特灵公式是一条用来取n阶乘近似值的数学公式。一般来说,当n很大的时候,n阶乘的计算量十分大,所以斯特林公式十分好用,而且,即使在n很小的时候,斯特林公式的取值已经十分准确。 其公式为: 斯特林公式可以用来估算某数的大小,结合lg可以估算某数的位数,或者可以估算某数的阶乘是另一个数的倍数。 这里我就 阅读全文
posted @ 2018-02-05 13:32 Dillonh 阅读(541) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.net/acm/contest/75/E 题目描述:给定一个整数N(0≤N≤10000),求取N的阶乘 输入描述:多个测试数据,每个测试数据输入一个数N 输出描述:每组用一行输出N的阶乘 输入 1 2 3 输出 1 2 6 思路:刚看到时我以为是打 阅读全文
posted @ 2018-02-04 21:36 Dillonh 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1232 畅通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submis 阅读全文
posted @ 2018-01-27 20:22 Dillonh 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 我的模板最适合我,不知道适不适合浏览本篇博客的各位。如果有觉得好的地方,可以取走;不好的地方看看就好。 下面是我的模板: 1 //并查集模板 2 3 //头文件&&预处理(适合窝自己的) 4 #include <set> 5 #include <cstdio> 6 #include <algorit 阅读全文
posted @ 2018-01-27 20:11 Dillonh 阅读(118) 评论(0) 推荐(0) 编辑
摘要: B. Complete the Word time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder loves 阅读全文
posted @ 2018-01-20 20:31 Dillonh 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Olympiad Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description You are one of the competitors of the Ol 阅读全文
posted @ 2017-12-21 16:21 Dillonh 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Aggressive cows 题目:Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions 阅读全文
posted @ 2017-12-11 13:48 Dillonh 阅读(192) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11