C++
Yihui_He
Deep Learning, Computer Vision, AI, Computer Network
展开
-
【图像识别】 目标追踪之简单的探测追踪
探测追踪就是 track by detection步骤如下:x(k)(i) 在第i帧的时候检测到的第k个物体t(k)(i)第i帧时候的捕捉器*t(k)(i)能够使x 与t对应上的t我们知道两帧之间物体移动是比较小的,所以可以确定出*t原创 2015-03-16 10:12:11 · 2107 阅读 · 0 评论 -
树的同构
03-树1 树的同构 (25分)给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。例如图1给出的两棵树就是同构的,因为我们把其中一棵树的结点A、B、G的左右孩子互换后,就得到另外一棵树。而图2就不是同构的。图1图2现给定两棵树,请你判断它们是否是同构的。输入格式:原创 2015-11-25 11:41:58 · 1419 阅读 · 0 评论 -
整数划分问题--DFS
单点时限:1000ms 内存限制:256MB描述 Given two positive integers N and M, please divide N into several integers A1, A2, …, Ak (k >= 1), so that: 1. 0 < A1 < A2 < … < Ak; 2. A1 + A2 + … + Ak = N; 3. A1, A2, …,原创 2015-08-12 09:21:21 · 910 阅读 · 0 评论 -
C++ 字符串查找例子.
题目:程序:#include <stdio.h>#include <cstdio>#include <iostream>#include <math.h>#include <stack>#include <queue>#include <string>#include <string.h>#define FOR(i,n) for (int (i)=0;(i)<(n);(i)++)#d原创 2015-06-17 18:37:07 · 1002 阅读 · 0 评论 -
[C++]string类的查找函数
string类的查找函数: int find(char c, int pos = 0) const;//从pos开始查找字符c在当前字符串的位置int find(const char *s, int pos = 0) const;//从pos开始查找字符串s在当前串中的位置int find(const char *s, int pos, int n) const;//从pos开始查找字符串s中前n个原创 2015-06-17 18:30:31 · 1156 阅读 · 0 评论 -
编程之美 大神与三个小伙伴
#include #include using namespace std;const long long great = 1000000007;bool isSame(long long a, long long b, long long c){ if (a == b && b == c) return true; if (a == b) return false;原创 2015-04-13 13:43:17 · 635 阅读 · 0 评论 -
[shuju]一道简单题 Uva 11991
#include #include #include using namespace std;int main(){ map > a; int n, int m; while (scanf("%d%d", &n, &m) == 2){ for (int i = 0; i < n; i++){ int x; scanf("%d", &x); if (!a.c原创 2015-04-09 16:53:06 · 567 阅读 · 0 评论 -
字符串匹配
实现支持如下特性的字符串匹配程序: (1) ’?’可匹配任意字符 0 次或者 1 次,如“a?”可匹配”a”或者” ”; (2) ’.’可匹配任意单个字符; (3) ’*’可匹配任意字符任意多次,如“a*”可匹配” ”,”a”,”aa”… (4) ‘+’可匹配任意字符至少 1 次,如”a+”可匹配”a”,”aa”…(该项可选) 输入:模式字符串和待匹配字符串原创 2015-04-13 20:14:36 · 540 阅读 · 0 评论 -
[编程之美]资格赛 B Palindrome
既然这个是资格赛, 时间也比较充裕, 我就讲解一下我做题的过程Time Limit:2000msCase Time Limit:1000msMemory Limit:256MBDescriptionGiven a string, calculate the number of subsequences that are palindrome.原创 2015-04-18 11:55:48 · 838 阅读 · 0 评论 -
[vs运行报错] CRT detected that the application wrote to memory after end of heap buffer
CRT 是c/c++ run-time lib , 是程序运行时所需的核心库.这个错误是因为以对内在操作的过程中,所写的地址超出了,所分配内在的边界有个建议是:1、内存申请多少释放多少,释放掉你申请过的内存,不要乱释放;2、不能释放已经释放的内存;原创 2015-03-12 19:35:21 · 1053 阅读 · 0 评论 -
[C++技巧] C++中动态开辟多维数组
// 我给大家开辟一个 vis[nl][nc]的 bool类型数组, 这种方法开辟的数组内存并非连续, 但是影响不大bool **vis;//指向指针的指针visvis = new bool*[nl];//使得vis指向nl个bool类型的指针, 即后面的vis[i]for (int i = 0; i != nl; i++) vis[i] = new bool[nc];//使得原创 2015-03-10 15:43:05 · 858 阅读 · 0 评论 -
[背景分离] 识别移动物体基于高斯混合 MOG
使用非常简单, frame 就是当前帧, foreground 是取得的, binary 型背景, 0.03是学习速率可以根据实际调整.cv::BackgroundSubtractorMOG mog;mog(frame, foreground, 0.03);原创 2015-03-16 16:20:03 · 1044 阅读 · 0 评论 -
[新书推荐]A Practical Introduction to Computer Vision with OpenCV
一本opencv好书, 在我上传的资源里 Computer Vision is a rapidly expanding area and it is becomingprogressively easier for developers to make use of this field dueto the ready availability of high quality libra原创 2015-03-16 09:40:37 · 1144 阅读 · 0 评论 -
04-树5 Root of AVL Tree
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is原创 2015-11-26 16:41:52 · 628 阅读 · 0 评论