码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
HDU - 2018 :递推
http://acm.hdu.edu.cn/showproblem.php?pid=2018 #include <stdio.h> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <a ...
分类:其他好文   时间:2020-02-01 16:38:13    阅读次数:83
HDU - 超级楼梯
http://acm.hdu.edu.cn/showproblem.php?pid=2041 #include <stdio.h> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <a ...
分类:其他好文   时间:2020-02-01 16:25:41    阅读次数:77
HDU - 一只小蜜蜂 :递推
http://acm.hdu.edu.cn/showproblem.php?pid=2044 #include <stdio.h> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <a ...
分类:其他好文   时间:2020-02-01 16:17:05    阅读次数:64
动态规划 ---- 最长公共子序列(Longest Common Subsequence, LCS)
分析: 完整代码: // 最长公共子序列 #include <stdio.h> #include <algorithm> using namespace std; const int N = 100; char A[N], B[N]; int dp[N][N]; int main() { freop ...
分类:其他好文   时间:2020-02-01 14:15:10    阅读次数:61
Educational Codeforces Round 81 题解
A题 肯定是1越多越好,因为位数越大越大,所以当n是2的倍数的时候,全是1 但是n可能不是n的倍数,此时应该有(n-3)/2个1和1个7,并且7在前面 #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #i ...
分类:其他好文   时间:2020-02-01 12:56:08    阅读次数:83
LeetCode Solution-74
74. Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: $\bullet$I ...
分类:其他好文   时间:2020-02-01 10:28:11    阅读次数:56
【cf1270E】E. Divide Points(构造)
"传送门" 题意: 给出$n,n\leq 3000$个互不重合的点,现在将点分为两组,使得不同组中点的距离不等于任何两个在同一组中点的距离。 给出一个分组方案。 思路: 这是一个构造题。 将点按照坐标的奇偶分类,一共只有四类: $$ (0,0),(0,1),(1,0),(1,1) $$ 会发现我们这 ...
分类:其他好文   时间:2020-02-01 00:28:52    阅读次数:91
POJ 3069 Saruman's Army
1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #include<queue> 5 #include<map> 6 #include<vector> 7 #include<set> 8 #include<string> ...
分类:其他好文   时间:2020-01-31 18:49:43    阅读次数:71
【转】20世纪十大算法
Quora问题:What are the top 10 algorithms of the 20th century? Pratyush Kumar回答: Top Ten Algorithms 1946: The Metropolis Algorithm for Monte Carlo. Throu ...
分类:编程语言   时间:2020-01-31 13:55:47    阅读次数:93
最短路径算法整理
最短路径 1.概念 单源最短路径 单源最短路径实际是计算源点到其他各个顶点的最短路径的长度,常见算法有dijkstra算法 全局最短路径 全局最短路径实际是计算每个源点到其他各个顶点的最短路径的长度,我们可以调用dijkstra算法N次(这样没有Floyd算法快),常见解决全局最短路径的方法是Flo ...
分类:编程语言   时间:2020-01-31 10:21:29    阅读次数:79
共11758条   上一页 1 ... 93 94 95 96 97 ... 1176 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!