随笔分类 -  ACM/数论

摘要:Gerald and Giant Chess Problem's Link: http://codeforces.com/contest/559/problem/C Mean:一个n*m的网格,让你从左上角走到右下角,有一些点不能经过,问你有多少种方法。 analyse:BZO... 阅读全文
posted @ 2015-07-23 09:35 北岛知寒 阅读(351) 评论(0) 推荐(0) 编辑
摘要:Y sequence Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5297 Mean:有连续数列A={1,2,3,4,5,6,7,8 .....},将可以表示成a^b次方的数删除,a={1,2,3,4,5...},... 阅读全文
posted @ 2015-07-22 17:37 北岛知寒 阅读(207) 评论(0) 推荐(0) 编辑
摘要:开关问题 Problem's Link: http://poj.org/problem?id=1830 Mean: 略 analyse: 增广矩阵:con[i][j]:若操作j,i的状态改变则con[i][j]=1,否则con[i][j]=0。 最后的增广矩阵应该是N*(N+1),最后一列:对比开光 阅读全文
posted @ 2015-06-17 22:38 北岛知寒 阅读(217) 评论(0) 推荐(0) 编辑
摘要:SumProblem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=4704Mean:给定一个大整数N,求1到N中每个数的因式分解个数的总和。analyse:N可达10^100000,只能用数学方法来做。首先想到的是找规律。通过枚举小数据来找规律... 阅读全文
posted @ 2015-05-22 20:13 北岛知寒 阅读(273) 评论(0) 推荐(0) 编辑
摘要:Tom and matrix Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5226 Mean: 题意很简单,略。 analyse: 直接可以用Lucas定理+快速幂水过的,但是我却作死的用了另一种方法。 方法一:Lucas定理+ 阅读全文
posted @ 2015-05-21 23:37 北岛知寒 阅读(361) 评论(0) 推荐(0) 编辑
摘要:GalaxyProblem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5073Mean:在一条数轴上,有n颗卫星,现在你可以改变k颗卫星的位置,使得剩下的n-k颗卫星到某个点(不固定)的距离的平方和最小。抽象成数学语言后等价于:数轴上有n个点... 阅读全文
posted @ 2014-11-15 22:45 北岛知寒 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Problem's Link:http://acm.nyist.net/JudgeOnline/problem.php?pid=514Mean:给你一个l和r,求出在这个范围内的1的个数。analyse:简单的数位推理。Time complexity:O(n) n为数字的位数Source code:... 阅读全文
posted @ 2014-10-13 17:18 北岛知寒 阅读(167) 评论(0) 推荐(0) 编辑
摘要:// Memory Time // 1347K 0MS // by : Snarl_jsb // 2014-09-19-18.23 #include #include #include #include #include #include #include #include #include #include #include #include #define N 1000010 #... 阅读全文
posted @ 2014-09-19 18:55 北岛知寒 阅读(258) 评论(0) 推荐(0) 编辑
摘要:The Balance Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5706 Accepted Submission(s): 2311 Pro 阅读全文
posted @ 2014-09-19 18:16 北岛知寒 阅读(165) 评论(0) 推荐(0) 编辑
摘要:Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24002 Accepted Submission(s): 8 阅读全文
posted @ 2014-09-18 23:24 北岛知寒 阅读(200) 评论(0) 推荐(0) 编辑
摘要:Holding Bin-Laden Captive! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15064 Accepted Submiss 阅读全文
posted @ 2014-09-18 16:39 北岛知寒 阅读(335) 评论(0) 推荐(0) 编辑
摘要:Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13129 Accepted Subm 阅读全文
posted @ 2014-09-18 15:30 北岛知寒 阅读(457) 评论(1) 推荐(0) 编辑
摘要:找单词 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4093 Accepted Submission(s): 2933 Problem Des 阅读全文
posted @ 2014-09-18 13:58 北岛知寒 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Square Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8341 Accepted Submission(s): 5674 Pr 阅读全文
posted @ 2014-09-18 13:08 北岛知寒 阅读(485) 评论(0) 推荐(0) 编辑
摘要:Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4730 Accepted Submis 阅读全文
posted @ 2014-09-15 22:43 北岛知寒 阅读(379) 评论(0) 推荐(0) 编辑
摘要:不容易系列之一Problem Description大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了!做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时... 阅读全文
posted @ 2014-09-15 21:48 北岛知寒 阅读(1842) 评论(0) 推荐(0) 编辑
摘要:Visible Lattice PointsTime Limit:1000MSMemory Limit:65536KTotal Submissions:5636Accepted:3317DescriptionA lattice point (x,y) in the first quadrant (x... 阅读全文
posted @ 2014-09-12 22:36 北岛知寒 阅读(131) 评论(0) 推荐(0) 编辑
摘要:RelativesTime Limit:1000MSMemory Limit:65536KTotal Submissions:11372Accepted:5544DescriptionGiven n, a positive integer, how many positive integers le... 阅读全文
posted @ 2014-09-12 21:37 北岛知寒 阅读(173) 评论(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 北岛知寒 阅读(338) 评论(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 北岛知寒 阅读(519) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩