上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页
摘要: 参考来自《拓展kmp算法总结》:http://blog.csdn.net/dyx404514/article/details/41831947 扩展KMP解决的问题: 定义母串S和子串T,S的长度为n,T的长度为m; 求 字符串T 与 字符串S的每一个后缀 的最长公共前缀; 也就是说,设有exten 阅读全文
posted @ 2018-03-21 22:10 Dilthey 阅读(9921) 评论(0) 推荐(4) 编辑
摘要: 题目链接:https://ac.2333.moe/Problem/view.xhtml?id=1643 问题描述 输入两个正整数 n, m,输出 n!/m!,其中阶乘定义为 n!= 1*2*3*...*n (n>=1)。 比如,若 n=6, m=3,则 n!/m!=6!/3!=720/6=120。 阅读全文
posted @ 2018-03-17 16:43 Dilthey 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://www.spoj.com/problems/BALNUM/en/ Balanced numbers have been used by mathematicians for centuries. A positive integer is considered a balan 阅读全文
posted @ 2018-03-12 20:07 Dilthey 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4734 Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descriptio 阅读全文
posted @ 2018-03-11 19:50 Dilthey 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://cn.vjudge.net/problem/CodeForces-55D Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer numb 阅读全文
posted @ 2018-03-10 21:04 Dilthey 阅读(385) 评论(0) 推荐(1) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3652 Problem Description A wqb-number, or B-number for short, is a non-negative integer whose decimal f 阅读全文
posted @ 2018-03-08 20:30 Dilthey 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4352 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2018-03-07 21:26 Dilthey 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3709 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others Problem Descripti 阅读全文
posted @ 2018-03-05 18:11 Dilthey 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1009 基准时间限制:1 秒 空间限制:131072 KB 给定一个十进制正整数N,写下从1开始,到N的所有正数,计算出其中出现所有1的个数。 例如:n = 12 阅读全文
posted @ 2018-03-03 22:45 Dilthey 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 题目链接: Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Problem Description The counter-terrorists found a time bomb i 阅读全文
posted @ 2018-03-03 17:12 Dilthey 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2089 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Descripti 阅读全文
posted @ 2018-03-01 15:26 Dilthey 阅读(584) 评论(0) 推荐(0) 编辑
摘要: 模型的建立基本来自于:http://www.doc88.com/p-2078634086043.html 花了一天半的时间用新学会的matlab实现了一下。 ─────────────────────────────────────────────────────────────────────── 阅读全文
posted @ 2018-01-27 10:40 Dilthey 阅读(3454) 评论(11) 推荐(4) 编辑
摘要: 非递归算法: 根据圆盘的数量确定柱子的排放顺序: 若n为偶数,按顺时针方向依次摆放 A B C; 若n为奇数,按顺时针方向依次摆放 A C B。 然后进行如下操作: (1)按顺时针方向把圆盘1从现在的柱子移动到下一根柱子,即当n为偶数时,若圆盘1在柱子A,则把它移动到B;若圆盘1在柱子B,则把它移动 阅读全文
posted @ 2018-01-21 12:21 Dilthey 阅读(1323) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1432 基准时间限制:1 秒 空间限制:131072 KB 基准时间限制:1 秒 空间限制:131072 KB 基准时间限制:1 秒 空间限制:131072 KB 阅读全文
posted @ 2018-01-19 20:10 Dilthey 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 目录: 1、函数取整 2、数据显示格式 3、三角函数运算 4、矩阵运算 5、函数句柄 6、二维函数图像绘制 7、符号对象 8、关于微积分 9、关于逻辑语句 10、关于运算符 ─────────────────────────────────────────────────────────────── 阅读全文
posted @ 2018-01-17 22:09 Dilthey 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://cn.vjudge.net/problem/51Nod-1126 有一个序列是这样定义的:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. 给出A,B和N,求f(n)的值。 Input输入3个数: 阅读全文
posted @ 2018-01-17 22:04 Dilthey 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 首先考虑函数: floor(x) 向下取整ceil(x) 向上取整round(x) 四舍五入到最近的整数fix(x) 向零取整 通常情况下取模运算(mod)和求余(rem)运算被混为一谈,因为在大多数的编程语言里,都用'%'符号表示取模或者求余运算。 在这里要提醒大家要十分注意当前环境下'%'运算符 阅读全文
posted @ 2018-01-17 21:14 Dilthey 阅读(1633) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1835 基准时间限制:1 秒 空间限制:131072 KB 基准时间限制:1 秒 空间限制:131072 KB 基准时间限制:1 秒 空间限制:131072 KB 阅读全文
posted @ 2018-01-16 20:55 Dilthey 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 是在教材(《计算机算法设计与分析(第4版)》王晓东 编著)上看见的关于求全排列的算法; 我们可以看一下书上怎么写的: 看一下运行结果: 显然,这个函数在功能实现上……存在一定的问题(虽然思路上没问题),所以…… 我自己重新写了一个,也许以后可能用的到呢: 阅读全文
posted @ 2018-01-12 12:46 Dilthey 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Time limit 2000 ms Memory limit 262144 kB Source Codeforces Round #328 (Div. 2) Ari the monster is not an ordinary monster. She is the hidden identity 阅读全文
posted @ 2018-01-11 22:57 Dilthey 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/592/problem/B B. The Monster and the Squirrel time limit per test 1 second memory limit per test 256 megabytes inpu 阅读全文
posted @ 2018-01-10 22:03 Dilthey 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/551/C time limit per test 2 seconds memory limit per test 256 megabytes input standard input output stan 阅读全文
posted @ 2018-01-10 19:59 Dilthey 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/586/problem/B B. Laurenty and Shop time limit per test 1 second memory limit per test 256 megabytes input standard 阅读全文
posted @ 2018-01-09 00:03 Dilthey 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-12-17 19:12 Dilthey 阅读(1213) 评论(0) 推荐(0) 编辑
摘要: 第一章. 1. 2. 3. 4. 蒲丰投针问题:平面上画有等距离为a的平行线(a>0),向该平面任意投掷一枚长为l(0<l<a)的针,试求此针与平行线相交的概率. 5. 解: ────────────────────────────────────────────────────────────── 阅读全文
posted @ 2017-12-11 12:36 Dilthey 阅读(1227) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页