码迷,mamicode.com
首页 >  
搜索关键字:int-max    ( 1549个结果
优先级队列-堆
1 #include <cstdio> 2 #include <iostream> 3 4 using namespace std; 5 6 const int MAX_N = 1000; 7 8 // 用数组来实现二叉树 9 // 左儿子编号=自己*2 + 1 10 // 右儿子编号=自己*2 + ...
分类:其他好文   时间:2020-02-05 16:24:06    阅读次数:48
多重集组合数 简单dp
1 #include <cstdio> 2 #include <iostream> 3 4 using namespace std; 5 6 const int max_n = 1000+2; 7 const int max_m = 1000+2; 8 const int max_a = 1000+ ...
分类:其他好文   时间:2020-02-05 15:03:34    阅读次数:65
求最长公共子序列的长度
1 #include <cstdio> 2 #include <iostream> 3 4 using namespace std; 5 6 const int max_n = 1000 + 2; 7 const int max_a = 1e6 + 10; 8 9 int n; 10 int a[m ...
分类:其他好文   时间:2020-02-04 16:07:37    阅读次数:72
白书-多重部分和问题
1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 5 using namespace std; 6 7 8 const int max_n = 100 + 2; 9 const int max_a = 1e5 + 10; ...
分类:其他好文   时间:2020-02-04 15:56:47    阅读次数:62
if语句的汇编表示
转自:https://blog.csdn.net/u011608357/article/details/22586137 demo: C语言: int max(int x,int y) { if (x>y) return x; else return y; } 产生的汇编代码如下: 00000000 ...
分类:其他好文   时间:2020-02-03 19:25:22    阅读次数:115
LuoguP5748 集合划分计数
题意 一个有$n$个元素的集合,将其分为任意个非空子集,求方案数。集合之间是无序的,$\{\{1,2\},\{3\}\}=\{\{3\},\{1,2\}\}$。 设$f_n$表示用$n$个元素组成的集合的个数,显然$f_n=1$。设$F(x)$为$f$的指数型生成函数,那么$F(x)=\sum_{i ...
分类:其他好文   时间:2020-02-03 19:20:59    阅读次数:77
记忆化搜索
递归 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 5 using namespace std; 6 7 const int max_n = 100+2; 8 9 int dp[max_n][max_n]; 10 i ...
分类:其他好文   时间:2020-02-03 17:29:59    阅读次数:68
[leetcode]Maximum Product of Word Lengths
用了python的set。为了效率,先做了预处理,并排序了。要注意,排序完才好预处理,否则i,j会对不上。 class Solution: def maxProduct(self, words: List[str]) -> int: maxProd = 0 words = sorted(words, ...
分类:其他好文   时间:2020-02-01 21:34:23    阅读次数:75
010、Java中扩大数据类型
01.代码如下: package TIANPAN; /** * 此处为文档注释 * * @author 田攀 微信382477247 */ public class TestDemo { public static void main(String[] args) { int max = Integ ...
分类:编程语言   时间:2020-02-01 12:15:02    阅读次数:60
最短路 SPFA()链式前向星
在极端情况下,图特别大,用邻接链表也会超空间限制,此时需要用到链式前向星来存图。 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 const int inf = INT_MAX / 10; 5 const int num = ???; 6 s ...
分类:其他好文   时间:2020-01-30 22:54:25    阅读次数:63
1549条   上一页 1 ... 9 10 11 12 13 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!