码迷,mamicode.com
首页 >  
搜索关键字:构造法    ( 115个结果
算法做题顺序
初期: 一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996 ...
分类:编程语言   时间:2016-04-09 10:25:27    阅读次数:244
POJ题目分类(转)
初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996) ...
分类:其他好文   时间:2016-04-04 14:49:15    阅读次数:253
UESTC 1050 Different game 构造法
Alice is playing a new game recently. In this game, there are n different kinds of cards. We assume that Alice have ci pieces of cards for ith kind. Alice is asked to divide them into mm piles and then arrange each pile in one line. After that, Alice will ...
分类:其他好文   时间:2016-04-01 18:43:07    阅读次数:155
嗷嗷嗷,kuangbin大大博客上拉的题
正在学(learning),未学(waiting),已学(cut vovering) 初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟 ...
分类:其他好文   时间:2016-03-31 00:13:48    阅读次数:208
子集生成模板、
1 //子集生成算法:给定一个集合,枚举所有可能的子集。 2 //为了简单起见,讨论的方法中没有重复元素 3 4 //增量构造法 5 #include<cstdio> 6 #include<cmath> 7 void print_subset(int n,int* A,int cur) 8 { 9
分类:其他好文   时间:2016-02-05 11:43:12    阅读次数:128
中国剩余定理
2016.1.26由于比较懒,于是先copy百度一发-------------------我是分割线--------------------用现代数学的语言来说明的话,中国剩余定理给出了以下的一元线性同余方程组:有解的判定条件,并用构造法给出了在有解情况下解的具体形式。中国剩余定理说明:假设整数m1...
分类:其他好文   时间:2016-01-26 11:57:49    阅读次数:150
后缀数组 DC3构造法 —— 详解
学习了后缀数组,顺便把DC3算法也看了一下,传说中可以O(n)复杂度求出文本串的height,先比较一下倍增算法和DC3算法好辣。 DC3 倍增法时间复杂度 O(n)(但是常数很大) O(nlogn)(常数较小)空间复杂度 O(n) O(n)...
分类:编程语言   时间:2015-09-09 21:00:29    阅读次数:520
copy
一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996)二.图...
分类:其他好文   时间:2015-09-08 00:30:29    阅读次数:184
增量构造法 (白书P188)
#include #include using namespace std; int ans[6]; int n; void dfs(int cnt) { int i,j; for(i=0;i<cnt;i++) cout<<ans[i]<<" "; if(cnt) cout<<endl; int s=cnt?ans[cnt-1]+1:0; for(i=s;i<n;i++) { an...
分类:其他好文   时间:2015-08-20 13:09:48    阅读次数:133
ZOJ 3810 A Volcanic Island (2014年牡丹江赛区网络赛B题)
1.题目描述:点击打开链接 2.解题思路:本题是四色定理的模板题,不过有几种情况要提前特判一下:n==1直接输出,1 3.代码: #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #...
分类:其他好文   时间:2015-08-18 11:54:11    阅读次数:158
115条   上一页 1 ... 5 6 7 8 9 ... 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!