随笔分类 - 数学
摘要:Being the only living descendant of his grandfather, Kamran the Believer inherited all of the grandpa's belongings. The most valuable one was a piece
阅读全文
摘要:Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he wou
阅读全文
摘要:Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on i
阅读全文
摘要:由于几何问题一般是压轴题,对我来说过于复杂,而且这一块是交给队友了的,所以自己都没怎么做过。 为了应对蓝桥杯,和一些简单比赛,还是应该做几个几何水题,以免到时候遇到很水的题我都没有信心去做。 所以,下面的东西都很水,大神就不要浪费时间看了。 向量是基础: 可以方便使用加减乘除,可以有很多模板,而且能
阅读全文
摘要:The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians
阅读全文
摘要:Ms. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 300m
阅读全文
摘要:引例: Matrix Power Series: 题目大意,给定矩阵A,求A^1+A^2+A^3+...A^N。 题解:已知X=a,可以通过以下矩阵求出ans=a^1+a^2+...a^N ans=矩阵^n后第一行之和-1=矩阵^(n+1)后右上格的和-1。 同理:矩阵也可以,只需要把1改为单位矩阵
阅读全文
摘要:基本常见的路人皆知的博弈 巴什博奕(Bash Game);威佐夫博奕(Wythoff Game);尼姆博奕(Nimm Game)。 此外,还有翻硬币,删边等。 当然,不乏一些变态数学题。 基础博弈高中是学习过,但是过于基础,现在强化博弈方面。 一般的博弈最后取者胜。自然还有最后取者输的。 博弈的输赢
阅读全文
摘要:大概是需要前缀和优化DP,和记录左右范围。 还有一道题,没有下手,等做完了,再来总结。 1,数组分拆: 给定数组,问有多少种拆分法,使得每一段和不为0。 (1e5) (用map优化DP) #include<map> #include<cstdio> #include<cstdlib> #includ
阅读全文
摘要:给定n,(n<=10^3),然后输入n的数a[i],(a[i]<=1e10),求ans=(a1+a2+a3...an)! / (a1!*a2!*a3!...an!) 的结果的最一位数。 适用问题,n种物品,求全排种类,结果%10。 猜想1,斯特林公式,斯特林公式虽然误差越来越小,但是最后一位的误差是
阅读全文
摘要:You have been given a matrix C N*M, each element E of C N*M is positive and no more than 1000, The problem is that if there exist N numbers a1, a2, …
阅读全文
摘要:由于这是第一天去实现polya题,所以由易到难,先来个铺垫题(假设读者是看过课件的,不然可能会对有些“显然”的地方会看不懂): 一:POJ1286 Necklace of Beads :有三种颜色,问可以翻转,可以旋转的染色方案数,n<24。 1,n比较小,恶意的揣测出题人很有可能出超级多组数据,所
阅读全文
摘要:之前题目比较水,今天的还可以。 【A 不凡的大夫】 方法一:答案是log8(n!),解决方案是预处理,将需要的答案记录下来以免超内存; 方法二:用公式,斯特林公式: 【B 一个小问题】 题解:线性同余方程组,一看就不是中国剩余定理,当心。 【C 守护白起】 题解:polya。。。。。比赛的时候忘记加
阅读全文
摘要:在【乔明达的省选专题】里面有很多这样的解题技巧: 把Σ*Σ类型的题O(n^2)转化∑[n/i]∑[m/i],除法下结果相同的部分合并,复杂度降低至O(√n+√m)。当然论文里的题型应该说说很经典了。这里再积累几个基础题型。 1,求前n个正整数的约数之和,即∑=σ(i) ,(i=1到n)。其中n≤10
阅读全文
摘要:Recently kiki has nothing to do. While she is bored, an idea appears in his mind, she just playes the checkerboard game.The size of the chesserboard i
阅读全文
摘要:As we all know, the next Olympic Games will be held in Beijing in 2008. So the year 2008 seems a little special somehow. You are looking forward to it
阅读全文
摘要:描述 小Hi喜欢大,而小Ho喜欢小。他们所在的城市(视为二维平面)有N座法阵。现在他们各选三座法阵,以三座法阵为顶点组成三角形,并站在所选三角形的重心位置;二人选择的法阵可以有相同的。小Hi选择面积最大的三角形,小Ho选择面积最小的三角形。若有多个面积相同且符合他们要求的三角形,小Hi选择重心横坐标
阅读全文
摘要:http://blog.csdn.net/ACdreamers/article/details/25049767 https://www.cnblogs.com/liuweimingcprogram/p/5877411.html 做此题的时候遇到这么个东西,感觉挺有意思的,先把此题做了再回来填坑。
阅读全文
摘要:You have two integers L and R, and you are required to find the max xor value of a and b where L <= a <= R and L <= b <= R Input Two integers in a lin
阅读全文
摘要:描述 如下图所示,在X轴上方一共有N个三角形。这些三角形的底边与X轴重合,底边上两个顶点的坐标分别是(Li, 0)和(Ri, 0),底边的对顶点坐标是(Xi, Yi)。其中Li ≤ Xi ≤ Ri 且 Li < Ri。 你能求出这些三角形覆盖的面积之和吗? (重叠部分只算一次) 输入 第一行包含一个
阅读全文

浙公网安备 33010602011771号