Loading

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 29 下一页
摘要: RelativesTime Limit:1000MSMemory Limit:65536KTotal Submissions:11372Accepted:5544DescriptionGiven n, a positive integer, how many positive integers le... 阅读全文
posted @ 2014-09-12 21:37 北岛知寒 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Color Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7873 Accepted: 2565 Description Beads of N colors are connected together into a circu 阅读全文
posted @ 2014-09-12 00:52 北岛知寒 阅读(332) 评论(0) 推荐(0) 编辑
摘要: CARDS Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 1448 Accepted: 773 Description Alice and Bob have a set of N cards labelled with numb 阅读全文
posted @ 2014-09-11 20:53 北岛知寒 阅读(511) 评论(0) 推荐(0) 编辑
摘要: Mean:题目描述:给一个包含非负整数的数组(长度为n),找出由这些数字组成的最大的3的倍数,没有的话则输出impossible。analyse:首先想到的就是直接暴力,这是最蠢的方法,数据一大的话,必会TLE。直接用蛮力的话,生成所有的组合,为 2^n个,对每个数字再进行比较判断,需要 O(n)的... 阅读全文
posted @ 2014-09-10 19:36 北岛知寒 阅读(342) 评论(0) 推荐(0) 编辑
摘要: Solve the puzzle, Save the world!Problem DescriptionIn the popular TV series Heroes, there is a tagline "Save the cheerleader, Save the world!". Here ... 阅读全文
posted @ 2014-09-09 22:02 北岛知寒 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 组合数的个数 输入一个n,然后输入n个一位数,求这n个数组成的不重复出现的整数的总和。 Mean: 略 analyse: 这样的数可以是1~n位,总共数的数目为:P(n,1)+p(n,2)+p(n,3)+.....+p(n,n)个。(其中p(n,m)表示从n个数中选m个数组成的排列的数目)。 若将这 阅读全文
posted @ 2014-09-05 18:44 北岛知寒 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1的个数 Mean: 输入一个n,计算小于10^n的正整数中含有1的数的个数。 analyse: 这题是一道组合数学课后思考题。 基本思路: 组合数学乘法原则 + 容斥原理 n位数中,每位可选:{0,1,2,3,4,5,6,7,8,9},所以共有10^n种,其中要除掉每位都为0的情况,所以要减一。 阅读全文
posted @ 2014-09-03 23:11 北岛知寒 阅读(126) 评论(0) 推荐(0) 编辑
摘要: note:n元线性同余方程因其编程的特殊性,一般在acm中用的很少,这里只是出于兴趣学了一下n元线性同余方程的概念:形如:(a1*x1+a2*x2+....+an*xn)%m=b%m ..................(1)当然也有很多变形,例如:a1*x1+a2*x2+...+an*x... 阅读全文
posted @ 2014-09-03 09:16 北岛知寒 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Prime TestTime Limit:6000MSMemory Limit:65536KTotal Submissions:29046Accepted:7342Case Time Limit:4000MSDescriptionGiven a big integer number, you are... 阅读全文
posted @ 2014-09-02 22:55 北岛知寒 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.nefu.edu.cn/JudgeOnline/problemshow.phpMean:略。analyse:刚开始想了半天都没想出来,数据这么大,难道是有什么公式?首先我们要知道一点:n!里面所有的0都是2*5得来的,而且不管怎样2的数量一定是>5的数量,所以我们只需... 阅读全文
posted @ 2014-09-02 16:32 北岛知寒 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Prime DistanceTime Limit:1000MSMemory Limit:65536KTotal Submissions:12512Accepted:3340DescriptionThe branch of mathematics called number theory is abo... 阅读全文
posted @ 2014-09-02 16:13 北岛知寒 阅读(154) 评论(0) 推荐(0) 编辑
摘要: How many Fibs?DescriptionRecall the definition of the Fibonacci numbers:f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n>=3) Given two numbers a and b, calcul... 阅读全文
posted @ 2014-08-27 18:03 北岛知寒 阅读(237) 评论(0) 推荐(0) 编辑
摘要: FibonacciTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3515Accepted Submission(s): 1601Problem D... 阅读全文
posted @ 2014-08-20 21:46 北岛知寒 阅读(221) 评论(0) 推荐(0) 编辑
摘要: //Memory Time// 1347K 0MS// by : Snarl_jsb#include#include#include#include#include#include#include#include#include#include#include#include#define ... 阅读全文
posted @ 2014-08-15 19:03 北岛知寒 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 凸包(只针对二维平面内的凸包)一、定义简单的说,在一个二维平面内有n个点的集合S,现在要你选择一个点集C,C中的点构成一个凸多边形G,使得S集合的所有点要么在G内,要么在G上,并且保证这个凸多边形的面积最小,我们要求的就是这个C集合。二、算法求凸包的算法很多,常用的有两种:1. Graham扫描法,... 阅读全文
posted @ 2014-08-15 18:51 北岛知寒 阅读(537) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 29 下一页