2次dfs的方法: 1 void dfs(int u,int step) 2 { 3 int tmp=0; 4 if (step>t) 5 { 6 max_dist=step; 7 max_point=u; 8 } 9 for ...
分类:
其他好文 时间:
2014-08-28 22:22:26
阅读次数:
212
在设计智能家居系统方案时,一个非常关键的point就是组网方式。组网方式关系到整个智能家居系统的稳定性、可扩展性、实时性等;从安装及维护等各方面考虑,对于组网方式,本人觉得现在应该没人会去搭建一个有线的智能家居网络了吧,呵呵。。。。。...
分类:
其他好文 时间:
2014-08-28 21:13:16
阅读次数:
257
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-08-28 21:01:06
阅读次数:
179
头文件
/**
* 书本:【ThinkingInC++】
* 功能:重载的例子
* 时间:2014年8月12日22:12:36
* 作者:cutter_point
*/
#ifndef STASH3_H_INCLUDED
#define STASH3_H_INCLUDED
class Stash
{
int size; //表示要保存的数据占用的字节个数
int quant...
分类:
编程语言 时间:
2014-08-28 17:01:40
阅读次数:
341
题目链接题意 : 对输入的点极角排序思路 : 极角排序方法#include #include #include #include using namespace std;struct point{ double x,y;}p[50],pp;double cross(point a,point ...
分类:
其他好文 时间:
2014-08-28 14:45:59
阅读次数:
175
typedef struct Spoint{ int x; int y; Spoint() { x = -1; y = -1; }};static Spoint point[8];int Queen8(int n, int cur){ static int iCount = 0; if(cur...
分类:
其他好文 时间:
2014-08-28 13:01:09
阅读次数:
183
// Threshold.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include
#include
int g_threshold = 100;
IplImage* img1= NULL;
IplImage* g_gray = NULL;
CvMemStorag...
分类:
其他好文 时间:
2014-08-28 11:27:19
阅读次数:
188
解:1.37 (define?tolerance?0.00001)
(define?(average?x?y)
??(/?(+?x?y)?2.0))
(define?(fixed-point?f?first-guess)
??(define?(close-enought??v1?v2)
????(<?(abs?(-?v1?v2)...
分类:
其他好文 时间:
2014-08-28 01:01:08
阅读次数:
238
题目如题。题解如题。
由于目标点最多只有4个,先bfs出俩俩最短路(包括起点),再dfs最短路。)0s1A;(当年弱跪杭州之题,现看如此简单)
#include
#include
#include
#include
#include
using namespace std;
struct point
{
int x,y;
int cnt;
};
char a[105][105]...
分类:
其他好文 时间:
2014-08-27 22:00:38
阅读次数:
272