码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
Greedy Algorithm and Huffman
"1. Question / 实践题目" "2. Analysis / 问题描述" "3. Algorithm / 算法描述(说明你的贪心策略,并且参考会场安排问题,利用反证法证明贪心选择和最优子结构性质)" "3.1. Huffman Tree Algorithm" "3.1.1. How to ...
分类:其他好文   时间:2019-11-16 23:10:13    阅读次数:89
coding++:高并发解决方案限流技术-----漏桶算法限流
1、漏桶算法 漏桶作为计量工具(The Leaky Bucket Algorithm as a Meter)时,可以用于流量整形(Traffic Shaping)和流量控制(TrafficPolicing),漏桶算法的描述如下: 一个固定容量的漏桶,按照常量固定速率流出水滴; 如果桶是空的,则不需流 ...
分类:编程语言   时间:2019-11-16 21:51:23    阅读次数:105
AcWing 9. 分组背包问题
#include <iostream> #include <algorithm> using namespace std; const int N = 110; int n, m; int v[N][N], w[N][N], s[N]; int f[N]; int main() { cin >> n ...
分类:Windows程序   时间:2019-11-16 21:43:40    阅读次数:102
AcWing 5. 多重背包问题 II
//二进制优化 最后变为01背包 #include <iostream> #include <algorithm> using namespace std; const int N = 12010, M = 2010; int n, m; int v[N], w[N]; int f[M]; int ...
分类:Windows程序   时间:2019-11-16 21:29:52    阅读次数:83
P5657 格雷码
思路 考场上的递归思路 每次向下递归的时候判断是左半边还是右半边即可 注意向右半边递归之后下一层序列要反转过来即可 代码 ...
分类:其他好文   时间:2019-11-16 21:24:55    阅读次数:68
最大m字段和 自写的板子^_^
#include<map> #include<set> #include<cmath> #include<stack> #include<queue> #include<cstdio> #include<string> #include<vector> #include<cstring> #incl ...
分类:其他好文   时间:2019-11-16 21:10:18    阅读次数:54
md5.js
/* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Pa ...
分类:Web程序   时间:2019-11-16 20:03:41    阅读次数:198
字符分类器-海明分类器
/* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Pa ...
分类:其他好文   时间:2019-11-16 19:22:38    阅读次数:98
从一道Hard学习滑动窗口
滑动窗口 滑动窗口(sliding windows algorithm)这种方法,专门用于解决区间解的问题。它在运算的时候,将解集放在窗口中,结束的时候比对是否符合预期。在运算的过程中,会对窗口的左右边缘进行操作(扩大、缩小)。特别针对于线性输入解决,滑动窗口就很形象了。 30. Substring ...
分类:其他好文   时间:2019-11-15 12:14:42    阅读次数:57
剑指offer-面试题17-打印从1到最大的n位数-数字
/* 题目: 输入数字n,按顺序打印从1到最大的n位十进制数。 如输入3,打印从1,2,3到999。 */ /* 思路: 大数问题转化为字符串或数组。 */ #include<iostream> #include<string.h> #include<algorithm> #include<cmat ...
分类:其他好文   时间:2019-11-14 21:29:55    阅读次数:53
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!