
数学
henucyt
这个作者很懒,什么都没留下…
展开
-
卡特兰数
题目描述整个世界都在散发着恋爱的恶臭,只有spring依旧保持着单身贵族的清香。spring单身久了,煮饺子看见两个黏在一起的都要强行分开,所以在看到凸n边形的时候,总是习惯性的拆分成n-2个小三角形,毕竟第三者插足是spring最喜闻乐见的,那么给出一个凸n边形,有多少种方法能够将凸n边形分解成n-2个小三角形。输入输入一个正整数n,表示有个凸n变形 2<n<30...原创 2018-08-05 16:50:19 · 185 阅读 · 1 评论 -
POJ 2407 Relatives(欧拉函数模板)
Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such tha...原创 2018-08-06 17:13:01 · 163 阅读 · 0 评论 -
HDU - 5187 zhx's contest(快速幂,快速乘法
Problem DescriptionAs one of the most powerful brushes, zhx is required to give his juniors n problems.zhx thinks the ith problem's difficulty is i. He wants to arrange these problems in a beautif...原创 2018-08-07 09:57:22 · 424 阅读 · 2 评论 -
POJ - 2478 Farey Sequence (欧拉函数
题目链接The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few ar...原创 2018-08-07 19:23:15 · 361 阅读 · 1 评论 -
HDU - 1568 Fibonacci (斐波那契,大数取前几位
2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列(f[0]=0,f[1]=1;f[i] = f[i-1]+f[i-2](i>=2))的值全部给背了下来。接下来,CodeStar决定要考考他,于是每问他一个数字,他就要把答案说出来,不过有的数字太长了。所以规定超过4位的只要说出前4位就可以了,可是CodeStar自己又记不住...原创 2018-08-08 09:31:38 · 1296 阅读 · 0 评论