前言
图像的平滑处理,是计算机视觉中非常重要的操作,本文将展示一个可以对图像进行平滑处理的简单程序。而关于平滑处理深层次的知识,会在以后的文章中重点探讨。代码示例 1
// 此头文件包含图像IO函数的声明 2 #include "highgui.h" 3 // 此头文件包含基本的图像处理函数和高.....
分类:
其他好文 时间:
2014-05-20 02:35:49
阅读次数:
376
题目描述有m个盒子,第i个盒子的长尾hi,宽为wi。如果两个盒子i,j满足hi#include#includeusing
namespace std;const int maxn=20001;struct node{ int x,y;}box[maxn];int
a[maxn];bool cm...
分类:
其他好文 时间:
2014-05-20 02:11:24
阅读次数:
251
最近也学学这些,争取把所有东东都串起来。#include #include int
WINAPI WinMain( HINSTANCE hInstance, HINSTANCE PrevInstance, LPSTR lpCmdLine,
int nCmdShow ){...
1.sprintf,sprintf_ssprintf(char* buffer, const
char* format, [argument]);vs下需要加上_CRT_SECURE_NO_WARNINGS#include using namespace
std;int main(){ cha...
分类:
其他好文 时间:
2014-05-20 01:40:00
阅读次数:
292
题意:容易理解。分析:当n%(p+q)==0时,先取者必胜,必胜方案:先取q,然后对方去x个,先取者就取(p+q-x)个,最后对方就必须取玩p个,当n%(p+q)==r(rp&&r#include#includeint
main(){ int n, p, q; while(scanf("...
分类:
其他好文 时间:
2014-05-20 01:31:58
阅读次数:
233
重新整理Trie的内容,还有一种叫做双链键树,不过到现在也不会写。Trie
可以称为字典树,也叫做前缀树,叫字典树很形象,叫前缀树可以很好的区分,因为还有一种树叫做后缀树自己就不瞎总结了,写估计也写不好。关键是时间不允许。参考两个blog
A B先给一个比较标准的模板 1 #include 2 #i...
分类:
其他好文 时间:
2014-05-17 15:00:46
阅读次数:
388
#include using namespace std;int func(int x){ int
cnt = 0; while (x) { cnt++; x = x&(x - 1); } return cnt;}int main(){ ...
分类:
其他好文 时间:
2014-05-17 14:54:19
阅读次数:
194
专出神题的xyz。支持删加边、修改点权、维护树的直径。LCT
需要额外记录子树信息。用一个堆维护。#include#include#include#include#include#includeusing
namespace std;#define rep(i,x,y) for(i=x;i=y;i....
分类:
其他好文 时间:
2014-05-17 14:29:38
阅读次数:
667
1 package main //main函数 2 import "fmt"
//相当于#include 3 func main() { 4 ar := [10]int{9, 8, 6, 4, 2, 7, 1, 3, 0, 5} 5
num := len(ar) //...
分类:
其他好文 时间:
2014-05-17 14:25:49
阅读次数:
272
熟悉C#的人都清楚delegate,也清楚委托的作用。实现观察者模式,在C++中的一种做法就是通过接口继承来实现,这无疑大大增加了耦合度。通过delegate变可以解除这种耦合。下面是上班时间,偷偷实现的一个我的delegate。直接上码:#include#include#include#inclu...
分类:
编程语言 时间:
2014-05-17 14:18:27
阅读次数:
341