上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页

2019年1月16日

究极无敌卧槽2的幂数

摘要: 文章出处:http://www.cnblogs.com/skyiv/archive/2010/03/27/1698550.html数的分解,据说是清华的一道复试上机题来源: http://topic.csdn.n... 阅读全文

posted @ 2019-01-16 18:28 湫叶 阅读(92) 评论(0) 推荐(0) 编辑

2019年1月15日

字符串常用函数

摘要: https://blog.csdn.net/fdqw_sph/article/details/54233971提取子串和字符串连接题取子串的函数是:substr(),形式如下:s.substr();//返回s的全... 阅读全文

posted @ 2019-01-15 22:32 湫叶 阅读(210) 评论(0) 推荐(0) 编辑

KMP

摘要: 作用是找大串里匹配的小串的位置理解好难,先讲一下原理。找目前字符串的Border:是一个字符串最长的,能跟真后缀相同的真前缀的长度。比如ABCDABCD从1号到八号 Border分别是00001234.。如何求B... 阅读全文

posted @ 2019-01-15 22:27 湫叶 阅读(121) 评论(0) 推荐(0) 编辑

2019年1月14日

勾股数定理

摘要: 一、勾股数形如 一类的数称为勾股数(a,b,c为正整数)。x^2+y^2=z^2二、一些性质1.直角三角形的两条直角边和斜边满足勾股数定理。2. .a+b>c,a-b2时,方程没有正解。 people in US... 阅读全文

posted @ 2019-01-14 18:15 湫叶 阅读(727) 评论(0) 推荐(0) 编辑

H - Happy 2004

摘要: Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is... 阅读全文

posted @ 2019-01-14 16:31 湫叶 阅读(75) 评论(0) 推荐(0) 编辑

D - Primes

摘要: Write a program to read in a list of integers and determine whether or not each number is prime. A number,... 阅读全文

posted @ 2019-01-14 10:53 湫叶 阅读(144) 评论(0) 推荐(0) 编辑

2019年1月13日

用费马小定理求逆元

摘要: 费马小定理(Fermat's little theorem)是数论中的一个重要定理,在1636年提出,其内容为: 假如p是质数,且gcd(a,p)=1,那么 a^(p-1)≡1(mod p),例如:假如a是整数,... 阅读全文

posted @ 2019-01-13 20:29 湫叶 阅读(207) 评论(0) 推荐(0) 编辑

唯一分解定理

摘要: •其包括两个断言:断言1:数n可以以某种方式分解成素数乘积。• 断言2:仅有一种这样的因数分解。(除因数排 ... 阅读全文

posted @ 2019-01-13 20:11 湫叶 阅读(168) 评论(0) 推荐(0) 编辑

素数//素数筛

摘要: 枚举所有小于数,看是否它能整除其他自然数,但实际上只需要枚举根号次。bool Is_prime(int n){ for(int i=1;i*i#include using namespace std;boo... 阅读全文

posted @ 2019-01-13 19:16 湫叶 阅读(98) 评论(0) 推荐(0) 编辑

2019年1月1日

摘要: 题目描述乌龟家的屋顶是凹凸不平的,所以每次雨后都会积水。为了知道屋顶是否会在暴雨后塌掉,他把屋顶的形 状给了你,希望你帮他计算暴雨后屋顶的积水总量。乌龟的屋顶由顺次排在同一水平线上的 n 个宽度为 1、高度为整数... 阅读全文

posted @ 2019-01-01 23:30 湫叶 阅读(124) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页

导航