上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 74 下一页
摘要: 题目: 传送门 题意很简单就不解释了,水题一道。 阅读全文
posted @ 2015-03-10 21:27 人艰不拆_zmc 阅读(229) 评论(0) 推荐(0)
摘要: HDU 5003 水题,直接上代码(因为题意读错了,WA了一遍)。 HDU 5038 这题的题意真是无比坑啊,还有为么G++超时,C++就过了,尼玛这个大水题浪费了我好几个小时,我百度了一下说只有HDU上面C++快于G++,一般情况下(没算法的情况居多)如果用G++交 TLE了,请在用C++交一遍。 阅读全文
posted @ 2015-03-10 21:22 人艰不拆_zmc 阅读(308) 评论(0) 推荐(0)
摘要: 题目:传送门 题目描述 This is a very simple problem, just like previous one. You are given a postive integer n, and you need to divide this integer into m piece 阅读全文
posted @ 2015-03-10 20:58 人艰不拆_zmc 阅读(221) 评论(0) 推荐(0)
摘要: 题目:传送门 题目描述 整数划分是一个非常经典的数学问题。 所谓整数划分,是指把一个正整数n写成为n=m1+m2+...+mi的形式,其中mi为正整数,并且1<=mi<=n,此时,{m1, m2, ..., mi}为n的一个划分。如果{m1, m2, ..., mi}中的最大值不超过m,即max{m 阅读全文
posted @ 2015-03-10 20:39 人艰不拆_zmc 阅读(318) 评论(0) 推荐(0)
摘要: 题意:传送门 题目描述 As you know, shadow95 is pretty good at maths, especially combinatorial mathematics. Now, he has made a problem for you. We call a subset 阅读全文
posted @ 2015-03-10 20:34 人艰不拆_zmc 阅读(242) 评论(0) 推荐(0)
摘要: 题目:传送门 题目描述 You are given an integer array s[] and are asked to count how many positions a, b, c and d satisfy the condition: s[a] + s[b] + s[c] == s[ 阅读全文
posted @ 2015-03-10 20:18 人艰不拆_zmc 阅读(172) 评论(0) 推荐(0)
摘要: 题目描述 给定n组整数(a,b),计算组合数C(a,b)的值。如C(3,1)=3,C(4,2)=6。 输入 第一行为一个整数n,表示有多少组测试数据。(n <= 100000) 第2-n+1行,每行两个整数分别代表a,b;中间用空格隔开。(a,b <= 40) 第一行为一个整数n,表示有多少组测试数 阅读全文
posted @ 2015-03-10 19:52 人艰不拆_zmc 阅读(440) 评论(0) 推荐(0)
摘要: 题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1607 题目描述 A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) 阅读全文
posted @ 2015-03-10 19:44 人艰不拆_zmc 阅读(212) 评论(0) 推荐(0)
摘要: 题目:传送门 题目描述 Your task is to find the minimal positive integer number Q so that the product of digits of Q is exactly equal to N. 输入 The first line of 阅读全文
posted @ 2015-03-06 17:23 人艰不拆_zmc 阅读(219) 评论(0) 推荐(0)
摘要: 题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=3138 算法思想:在1-10两个数相乘要产生0,只有 10×1=2×5,2×5。 200!=200×199×198……×2×1=2×5×2×5×2×1 阅读全文
posted @ 2015-03-06 17:11 人艰不拆_zmc 阅读(257) 评论(0) 推荐(0)
摘要: A:http://codeforces.com/problemset/problem/519/A 水题没什么好说的。 B:http://codeforces.com/problemset/problem/519/B 水题,简单排序即可。 C:http://codeforces.com/problem 阅读全文
posted @ 2015-03-03 15:39 人艰不拆_zmc 阅读(294) 评论(0) 推荐(0)
摘要: A: HDU5170 这题让比较a^b与c^d的大小。1<=a,b,c,d<=1000. 显然这题没法直接做,要利用对数来求,但是在math库中有关的对数函数返回的都是浮点数,所以这又要涉及到eps问题。 其它就没有什么需要注意的了,我用的是log()函数,当然还可以用log10().....,原理 阅读全文
posted @ 2015-03-03 14:47 人艰不拆_zmc 阅读(233) 评论(0) 推荐(0)
摘要: C语言中之数学函数C语言提供了以下的数学函数,要使用这些函数时,在程序文件头必须加入:#include 编译时,必须加上参数「-lm」(表示连结至数学函式库),例如「gcc -lm test.c」。函数之自变量与传回之值型别见自变量或函数前之型别宣告。函数已经在「math.h」或其它标头档宣告过了,... 阅读全文
posted @ 2015-02-07 21:17 人艰不拆_zmc 阅读(831) 评论(0) 推荐(0)
摘要: 题目:POJ1269 题意:给你两条直线的坐标,判断两条直线是否共线、平行、相交,若相交,求出交点。 思路:直线相交判断、如果相交求交点。 首先先判断是否共线,之后判断是否平行,如果都不是就直接求交点了。 转载: 给你两条直线,判断这两条直线是否共线,相交,不相交(即平行),相交的话输出交点。 判断 阅读全文
posted @ 2015-02-07 10:52 人艰不拆_zmc 阅读(1160) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1115# 大意:给你个n,有n个点,然后给你n个点的坐标,求这n个点形成的多边形的重心的坐标。 直接套模板,我也不知道什么意思。注意在POJ上面定义double时,输出f,如果输出lf则WA,HDU上面输 阅读全文
posted @ 2015-02-06 19:55 人艰不拆_zmc 阅读(224) 评论(0) 推荐(0)
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 74 下一页