码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
GKH result insist
1.H-index a researcher at least h paper h score input: T test case N Ai output: thought: 好用的模板: Answer: #include <iostream> #include <algorithm> #incl ...
分类:其他好文   时间:2020-02-19 01:18:18    阅读次数:94
POJ2955 Brakets(区间dp)
我们知道一个的是0,因此先初始化两个长度的时候 之后运用区间dp的思想,如果s[l]和s[r]满足是一对,那么先由内部更新 之后我们枚举断点,计算相加的情况 #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> ...
分类:其他好文   时间:2020-02-18 16:41:24    阅读次数:70
剑指offer系列——37.数字在排序数组中出现的次数
Q:统计一个数字在排序数组中出现的次数。 A: 1.用STL库函数解决 (1)count函数:algorithm头文件定义,其功能类似于find。这个函数使用一对迭代器和一个值做参数,返回这个值出现次数的统计结果。 或 (2)equal_range函数:函数equal_range()返回first和 ...
分类:编程语言   时间:2020-02-18 16:38:24    阅读次数:79
1030 完美数列
two pointers通向扫描法。 #include<iostream> #include<algorithm> using namespace std; typedef long long LL; LL a[100010] = {0}; int main() { int n,p,max = -1 ...
分类:其他好文   时间:2020-02-18 13:04:59    阅读次数:49
[ML] 2. Introduction to neural networks
Training an algorithm involes four ingredients: Data Model Objective function: We put data input a Model and get output out of it. The value we call i ...
分类:Web程序   时间:2020-02-18 09:58:23    阅读次数:80
poj2243前一道题升级(思维构造+ac自动机)
题:http://acm.hdu.edu.cn/showproblem.php?pid=2243 题意:给出m个模式串,求长度小于n的且存在模式串的字符串数有多少个(a~z) 分析:我们反着来,用总的减去不包含的,总的很容易想到,每个位置都有26个选择,所以是Σ1n26i 不包含的 这里 有解决恰好 ...
分类:其他好文   时间:2020-02-17 23:40:23    阅读次数:74
POJ2828 Buy Tickets
有N个人排队,每一个人都有一个val来对应,每一个后来人都会插入当前队伍的某一个位置pos。要求把队伍最后的状态输出。 倒序插入,线段树单点更新,从头到尾输出线段树的状态 #include<cstdio> #include<algorithm> #include<cstring> using nam ...
分类:其他好文   时间:2020-02-17 19:51:39    阅读次数:77
HDU4695 最假女选手(吉司机线段树)
本题原理和代码讲解会在近日放到b站,对题目解法不是很了解的同学可以关注b站 朝暮不思 #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<vector> #include<string> # ...
分类:其他好文   时间:2020-02-17 19:32:58    阅读次数:58
随笔分类
Algorithm 基本数据结构: "Trie(字典树)" "贪心" "高精度" "位运算" "C++STL" 数据结构进阶: "线段树" 数论: "康拓展开 & 逆康拓展开" 图论: "图论 二分图" "图论 最短路" "图论 最小生成树" "图论 Tarjan" "图论 树的直径" Contes ...
分类:其他好文   时间:2020-02-17 17:46:07    阅读次数:50
后缀数组Da模板+注释 以及 dc3模板
后缀数组Da模板: 1 /* 2 后缀数组倍增法Da板子 3 */ 4 #include <cstdlib> 5 #include <cstring> 6 #include <cstdio> 7 #include <algorithm> 8 using namespace std; 9 const ...
分类:编程语言   时间:2020-02-17 16:23:51    阅读次数:79
共11758条   上一页 1 ... 81 82 83 84 85 ... 1176 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!